Posted 7:22 p.m., Monday 15 December, 2008.
Since 'newforms' became the norm within Django, there seems to have been some confusion relating to dynamic forms that relate specifically to a model.
The basic way to handle forms is to use a ModelForm for simple single-model-related forms, and Form instances for everything else, including more advanced Model-based forms. Many people seem to forget, however, that a ModelForm or Form instance can be manipulated after it's created.
In this blog post, I have included a design pattern I've recently used that should be of use to others who want to tweak their ModelForm instances at runtime.
Posted 9:12 p.m., Wednesday 23 July, 2008.
Django 1.0 Alpha is out, and with it come some major API changes to Django's internals. This means you need to make a number of changes to your Django projects before upgrading Django to a recent copy. I've got a handful of commercial and public-facing websites running on Django, so I decided now is a good time to upgrade them.
Want to see more? Check out the yearly archives below.
© Copyright 2006- Ross Poulton. All Rights Reserved unless explicitly defined.
Opinions expressed here are my own, and not those of my employer or any other party.