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 templates. But there are also special-purpose customizations that you can do to your Django apps.
- Custom managers
- http://docs.djangoproject.com/en/dev/topics/db/managers/
- Extra filters and tags
- http://docs.djangoproject.com/en/dev/ref/contrib/humanize/
- Custom tags
- http://docs.djangoproject.com/en/dev/howto/custom-template-tags/
- Custom filters
- http://docs.python.org/library/re.html
- Custom admin actions
- http://docs.djangoproject.com/en/dev/ref/contrib/admin/actions/