On Dec 28, 2007 3:04 PM, Todd O'Bryan <[EMAIL PROTECTED]> wrote:
>
> I have a use case where a Form superclass includes fields at the top
> and bottom of the form, with the subclasses providing the fields in
> the middle. Obviously, there's no easy way to fix the ordering using
> simple declaration. I went on IRC and someone told me about overriding
> self.fields.keyOrder in the Form's __init__ method, which works just
> great.
>
> I wrote up a patch for the docs that explains how to do this, but
> wanted to make sure the solution was kosher before I submitted it.

While I expect that's great information to provide, it seems like it
might be a bit too fine-grained for inclusion in the regular docs. If
the docs included instructions on how to do everything last thing
Django's capable of, it'd be completely overwhelming to those who
don't need those features.

Personally, I'd recommend you write up a wiki article on the subject,
reference it in the DjangoResources[1] article and post a link on
django-users so people know where to find it. Not to toot my own horn
(though I *am* a trumpet player, after all), but you could take a look
at the DynamicModels[2] and AuditTrail[3] articles as good examples of
how it can be done.

Adding it to the wiki opens up the possibility for somebody else to
refine your work and add to it, as George Vilches has done with the
audit trail article.

-Gul

[1] http://code.djangoproject.com/wiki/DjangoResources
[2] http://code.djangoproject.com/wiki/DynamicModels
[3] http://code.djangoproject.com/wiki/AuditTrail

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to