On 7/12/07, Todd O'Bryan <[EMAIL PROTECTED]> wrote:
> Is there a good reason not to do something like the following in
> django.db.models.Model?
>
> def form(self):
>     return form_for_instance(self)
>
> @classmethod
> def form(cls):
>     return form_for_model(cls)

Yes -- the good reasons against it are that it ties form logic to the
model and quashes the field namespace (disallowing you from having a
field named "form").

Adrian

-- 
Adrian Holovaty
holovaty.com | djangoproject.com

--~--~---------~--~----~------------~-------~--~----~
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