- Tuesday, February 4, 2014, 20:32
- Django, How-to, Python
Sometimes we need to delete or truncate all the database tables in django project from the view.py or controller file.
First of all you need to go to open the view.py and add the following code to your some functions:
Here, the Modelname is your django model Class name in Models.py.
Then run the application and make sure that the control reach the line where you added the ... Full story
- Saturday, March 26, 2011, 3:13
1. Download django Django-1.3.tar.gz
2. Extract it to get Django-1.3 folder.
3. Open Command Prompt
4. Go to the location where you extracted Django-1.3
5. Type python setup.py install
If you get error in step 5, you may not have registered in Environment variable. To do this Right Click My computer > Advance > Environment Variables > Path and add 'C:\python26' Full story