On Mon, Jan 31, 2011 at 12:06 PM, Tom Evans <tevans.uk@googlemail.com> wrote:
I just ran across this article from a delicious feed: Its a little tutorial about using Django and ajax to do just what you are asking.On Mon, Jan 31, 2011 at 4:51 PM, Bjorn Meyer <bjorn.m.meyer@gmail.com> wrote:A qualified yes; Of course it is possible, but it's not simply a
> Hi all, I am hoping that someone might be able to point me in the right
> direction for the following problem. I have been searching for a few days now
> and haven't been able to find a way to accomplish this. I have found some
> solutions that are close, but only work on editing an entry, not on add.
> I have models for the following:
> Each have a foreign key to the model above it.
> Country
> Prov/State
> City
> Region
> Community
> Is there a way in the Django admin to filter the values in the select boxes
> based on the selection in the previous select box? eg: I select Canada in the
> country select box, then in the Prov/State select box I am only presented with
> the Provinces. Once that is selected, the City select box only presents cities
> within the Province selected. etc...
> Is this possible?
>
question of saying 'Hey django-admin, these fields are related, so do
AJAX goodness', you would need to write it mostly yourself, including
a custom form that adds the additional fields (I assume that you would
only record the low level item, eg 'Community'), adding web service
calls so you can populate those fields, etc etc.
Cheers
Tom
--
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.
http://www.nerdydork.com/dynamic-filtered-drop-down-choice-fields-with-django.html
--
Joel Goldstick
--
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