I am working on a project that has a portion of the admin with three
different "choices" options. The section of the model that this
thread is concerned with looks like this:
Department_Choices = (
('Advertising', 'Advertisinf'),
('NIC', 'NIC'),
('Production', 'Production'),
)
Department_Groups = ( #Advertising has three groups, NIC has 5,
Produciton has 5
('Auto Sales', 'Auto Sales'),
('Print Production', 'Print Production'),
)
Subgroups = ( #some groups have sub-groups (ex. Auto Sales has print
and online subgroups)
('Online', 'Online'),
('Print', 'Print'),
)
# model
department = models.Charfield(choices=Department_Choices)
group = models.CharField(choices=Department_Goups)
subgroup - models.CharField(choices=Subgroups)
I would like to have something in place that filters the groups and
subgroups based on the department. So, if I choose Advertising in
departments it brings up applicable groups, if I bring up Auto in
groups it brings up applicable subgroups.
Does Django have a built in way of handling this, do I need to modify
the admin template? Do I need to forget about entering this in the
admin and create a form with a bunch of AJAX involved?
--
You received this message because you are subscribed to the Google Groups
"Django users" 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-users?hl=en.