Olifante *'s personal annotations on this page
-
Only use null=True for non-string fields such as integers, booleans and dates: Avoid using null on string-based fields such as CharField and TextField unless you have an excellent reason.
-
Use fixtures to reimport data and test your apps
manage.py dumpdata --indent=4 > initial.jsonandmanage.py loaddata initial, don't spend time to reinsert data everyday with the admin -
Put a
assert Falsein your code (in view) it will act as a breakpoint -
Create a settings-dev.py and a settings-production.py then link settings.py to the one you need
This link has been bookmarked by 10 people . It was first bookmarked on 17 Jul 2008, by Julien Bornstein.
-
-
Put a
assert Falsein your code (in view) it will act as a breakpoint, you can now browse the local vars in the debug page
-
-
Olifante *"Useful tips to start a new project with Django"
-
Only use null=True for non-string fields such as integers, booleans and dates: Avoid using null on string-based fields such as CharField and TextField unless you have an excellent reason.
-
Use fixtures to reimport data and test your apps
manage.py dumpdata --indent=4 > initial.jsonandmanage.py loaddata initial, don't spend time to reinsert data everyday with the admin - 2 more annotations...
-
-
robin guoHandle static choices the right way, use IntergerField for choices list\n
-
Julien BornsteinHandle static choices the right way, use IntergerField for choices list
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.