Hello!

I'm fairly new to Python and Django and have mostly focused on the
admin system so far, but I am a programmer with fairly deep html/css/
javascript knowledge.

I was wondering if it's possible to filter the list generated in admin
forms for a ManyToMany field in a model.

Ideally I would like a ForeignKey field (also a property of the model)
affect what choices are visible.
For example: If I in the ForeignKey-dropdown select an office name,
the ManyToMany field would get populated with only the branches from
that specific office instead of all branches in the database.

Is this best done via template changes (adding javascript)? Or through
creating my own Widget? Or is it even possible to do it natively in
the model or admin definitions?

/KB

--~--~---------~--~----~------------~-------~--~----~
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