Django: Beyond the SQL
Jerry Stratton
February 26, 2011
- Installation
- Installation in Django: Beyond the SQL
- Create your models
- http://docs.djangoproject.com/en/dev/topics/db/models/
- Create your administration models
- http://docs.djangoproject.com/en/dev/ref/contrib/admin/
- Public pages
- Public pages in Django: Beyond the SQL
- Customization
- Remember that you can add any method to your models, and use that method in your templates. If you have a method on the Post class called “otherAuthorPosts” that returns all of the other posts by this posting’s author, you can reference it as “post.otherAuthorPosts”. You can also provide any variable—including classes, lists, and dictionaries—to the context that your view creates, and pass it to your…
- Beyond the SQL: Cacheing
- http://docs.djangoproject.com/en/1.0/topics/cache/
- Modifying models
- Django’s syncdb command only creates new models. It doesn’t update existing models. If you make a change to your model in models.py, you will also need to make a corresponding change to the database table for that model.
- Scripting Django
- Django’s amazing API is useful for all sorts of tasks, not just web tasks. Any command-line script that deals with a database can take advantage of Django, and often your web databases have command-line scripts that work with them.
- Beyond the SQL (full HTML)
- HTML version of Django: Beyond the SQL
- Beyond the SQL (full PDF) (228.2 KB)
- PDF version of Django: Beyond the SQL
- Beyond the SQL (full RTF) (125.3 KB)
- RTF version of Django: Beyond the SQL
- ZIP Resources for Django: Beyond the SQL (1.1 MB)
- Resources for Django: Beyond the SQL, including samples and document graphics.