@@ -10,7 +10,7 @@ out of settings.py into localsettings.py. In your settings.py, you should do::
1010 try:
1111 from localsettings import *
1212 except ImportError:
13- print 'localsetting could not be imported'
13+ print 'localsettings could not be imported'
1414 pass #Or raise
1515
1616This should be at the end of settings.py, so that localsetting.py override
@@ -41,7 +41,7 @@ the request to output this. Make it as a templatetag.
4141Import as if your apps are on your project path
4242----------------------------------------------------
4343Instead of doing `from project.app.models import ModelClass` do `from app.models
44- import ModelClass`. Your apps are reusable
44+ import ModelClass`. This makes you apps reusable as they are not tied to a project.
4545
4646Naming things
4747-----------------
@@ -56,12 +56,12 @@ and not::
5656 class Posts(models.Model):
5757 ...
5858
59- Foreign key should use the name of referenced class.::
59+ Foreign key should use the name of the referenced class.::
6060
6161 class Post(models.Model):
6262 user = models.ForeignKey(User)
6363
64- Queryset should be plural, instances should be singular.::
64+ Querysets should be plural, instances should be singular.::
6565
6666 posts = Post.objects.all()
6767 posts = Post.objects.filter(...)
@@ -207,8 +207,8 @@ Have you handled all cases?
207207 ...
208208
209209Or it is? What about users created via `manage.py createsuperuser`, with the
210- above middleware, the default user can not even access the admi site.
210+ above middleware, the default user can not even access the admin site.
211211
212212Hence handle all scenarios in middleware and context processors. This is one place
213- where `try: .. except: ..` (bare except) block are acceptable. You do not wnat one
214- middleare bringing down entire site.
213+ where `try: .. except: ..` (bare except) blocks are acceptable. You do not want one
214+ middleare bringing down the entire site.
0 commit comments