http://www.texotela.co.uk/code/jquery/select/
There are also other ways of pre-filtering a model's choices... have a
look at:
http://www.stereoplex.com/blog/filtering-dropdown-lists-in-the-django-admin
and
http://www.artfulcode.net/articles/runtime-choicefield-filtering-in-djangos-admin/
On Oct 23, 4:58 pm, Alexandre González <agonzale...@gmail.com> wrote:
> Hi! I have a model as this:
>
> class User:
> id
>
> class Type:
> user = ForeignKey(User)
>
> class B:
> user = ForeignKey(User)
> type = ForeignKey(Type)
>
> When I'm creating a B object in the admin I like to show a combo with all
> the users, and after select the user in the first combo, fill the second
> combo only with Type of their users...
>
> I must do that with ajax and subquerys? or admin.py allow me to do this
> easily?
--
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