-1

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.

C14L
  • 10,584
  • 3
  • 29
  • 46

3 Answers3

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
  • 541,889
  • 55
  • 754
  • 786
0

Hope this will help you https://github.com/wibiti/uncompyle2

See this answer on uncompyle2 for some other comments.

Community
  • 1
  • 1
Anoop
  • 1,265
  • 7
  • 20
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,648
  • 2
  • 17
  • 28