- 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:
Modelname.objects.all().delete()
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, February 1, 2014, 9:25
- How-to
Hello guys its sometimes frustrating using xcode in different keyboards. Normally indentation in xcode can be done with the CMD + keys. Since keys are not directly present in Finnish keyboard it can be achieved from following commands:
To decrease indent:
CMD + ALT + 8
To increase indent:
CMD + ALT + 9
Hope it helps. :)
Full story