On 04/10/2011 03:14 PM, Jonas H. wrote:
Hello!
What's the preferred way to do a custom model field that has no
corresponding formfield? Intuitively, I'd say raise a
NotImplementedError, but that would make the whole model unusable in the
admin even if that field is excluded from being displayed.
That's because excluding a field from the admin display does not mean
`Field.formfield(...)` is left alone, a call into `formfield` happens
during validation checks (`check_formfield` in admin/validation.py).
So, are fields without a formfield possible already? If yes, how to do
it? If not, would you accept a patch that makes the `ModelAdmin.exclude`
attribute validation not call into `Field.formfield`?
Cheers,
Jonas
*push*
--
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
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/django-developers?hl=en.