I am using Django on Linux and am currently completing the tutorial, but a case of human error occurred. I accidentally deleted the views.py
file (in tutorial is in the polls directory) and it would really help if anyone knew a way to reinstall the files, or if it is even necessary in the first place. I'm new to Django, so please keep that in mind. Thank you.
Asked
Active
Viewed 330 times
-1

C14L
- 12,153
- 4
- 39
- 52
-
1Use source control – Sayse May 13 '16 at 19:08
3 Answers
1
The views.py doesn't contain anything until you write it. If you hadn't written anything yet, then just create a new empty file and call it views.py.
In future, you should always use source control.

Daniel Roseman
- 588,541
- 66
- 880
- 895
0
Hope this will help you https://github.com/wibiti/uncompyle2
See this answer on uncompyle2 for some other comments.
0
There is no way of getting back the files. They are deleted.
You could try a program that scans for deleted files, but don't count on it.
Source control and frequent backups are the best methods of preventing this problem in the future.

techydesigner
- 1,681
- 2
- 19
- 28