On Nov 12, 2007 4:05 PM, Joseph Kocherhans <[EMAIL PROTECTED]> wrote:
>     class Article(models.Model):
>         title = models.CharField(max_length=100)
>         body = models.TextField
>
>     class ArticleForm(models.Model)
>         body = MyCustomBodyField() # override the default formfield
>
>         class Options:
>             model = Article
>
> The resulting form here would still have 2 fields, title and body.
> body would have a custom form field, and title would have the default
> one.

Yes, that's exactly what I had in mind. You could have a
formfield_callback internally, I suppose, which just looks at the
ModelForm class to see if the field name is specified. If it is, use
that one, otherwise, use the default associated with the model Field.
But I don't see any reason to require Joe Developer to deal with
formfield_callback anymore.

-Gul

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to