I do agree. helper methods for every special case is not the solution.
on the other hand, it´s just not clear sometimes how things could/ 
should be done. I´d just wish for more "best practice" advice and  
more complex examples (esp. in the docs).

regards,
patrick

Am 25.06.2007 um 16:51 schrieb Malcolm Tredinnick:

>
> On Mon, 2007-06-25 at 16:41 +0200, patrick k. wrote:
>> thanks malcolm.
>>
>> get_initial_data should be defined in the form, I think. because the
>> form doesn´t necessarily relate to a model, so the model is probably
>> the wrong place.
>> I´m a bit surprised that this isn´t easier/cleaner with newforms.
>
> You can't really be surprised that Django doesn't include helper  
> methods
> for every special case. Particularly when writing your own method  
> takes
> four lines of code. There's a limit on how easy something can be,  
> given
> that the model, the field list, the form field names and the mapping
> between form fields and model fields are all variables.
>
> Regards,
> Malcolm
>
>
> >


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

Reply via email to