NoReverseMatch : custom registration templates break django unit tests

I’ve over-ridden several of the built-in django auth and {{ “bitbucket.org/ubernostrum/django-registration/” | ext_link: “django-registration”}} templates so I can have my own custom-styled login and registration pages. This all worked fine until i tried to run the built-in django and django_registration test suites, when everything fell apart : ...

November 10, 2009 · 3 min · Dave Perrett

Sending Django email with Gmail

After spending a few hours struggling to get postfix to work with django on my local dev machine, I gave up and decided to use Gmail . To do it, add the following to your settings.py : ...

October 16, 2009 · 1 min · Dave Perrett

Compiling mysql-python on OS X leopard

I’ve just finished trying to install mysql-python on OSX Leopard, and had quite a few problems. This is the procedure that finally ended up working for me. First, download mysql-python from here. Unzip and try to build it : ...

August 18, 2009 · 2 min · Dave Perrett

Splitting up Django models

Create a models folder under myApp. Delete models.py and add a model_name.py file in the models folder for each model model_name. Add the following to each model file : class Meta: app_label = 'myApp' Add a line in models/init.py for each model file : from myModelFile import myModel More information at djangoproject.com

December 31, 2006 · 1 min · Dave Perrett