Django Common

This code contains a collection of common things we believe every Django project needs.
  • A middleware that makes sure your web-app runs either on or without 'www' in the domain.
  • A SessionManagerBase base class, that helps in keeping your session related code object-oriented and clean! See session.py for usage details.
  • An Email Backend for authenticating users based on their email, apart from username.
  • Some custom db fields that you can use in your models including a UniqueHashField and RandomHashField.
  • Several functions in helper.py
  • A render_form_field template tag that makes rendering form fields easy and DRY.
  • A couple of dry response classes: JsonResponse and XMLResponse in the django_common.http that can be used in views that give json/xml responses.
We have open-sourced this code and you can find it here.
Check it out »