On Dec 12, 8:45 am, Dennis Schmidt <metzelti...@googlemail.com> wrote:
> Hi,
>
> actually that is how I do it. I'm subclassing from admin.ModelAdmin
> and then set the form-field to the custom form I made. But maybe this
> really only works for forms in applications.

No, it does work in the admin too. Setting the form attribute in your
ModelAdmin makes Django use your custom form. However, in your case,
you will need to also exclude your 'template' field using the exclude
attribute on your ModelAdmin class:

http://docs.djangoproject.com/en/dev//ref/contrib/admin/#exclude

This will ensure that the 'template' field is not displayed in the
admin's add/change forms.

-Rajesh D
--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to