Monday, August 27, 2012

Re: expand fieldset by choice

On 27-8-2012 18:31, Axel Rau wrote:

> Another question: How can I expand the right fieldset dependent of
> current content of my choices field (as loaded from db) while
> rendering the change page initially?

Look in django/contrib/admin/options.py for get_fieldsets(). Also look
at this bugreport for it's limitations:
<https://code.djangoproject.com/ticket/18681>

Short version: the method as it is implemented requires that you have at
least some declared fieldsets.

In case you're also new to python, you should convert your declared
fieldsets from a tuple to a list, so it's easier to modify it.
--
Melvyn Sopacua

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

No comments:

Post a Comment