On Thursday 15 June 2006 15:12, Antonello Cicchese wrote:

> now the problem is that in my admin i want to display in the city
> field only cities related to the previously selected state, how can i
> do this?

Hacking this in server side will be difficult.  My approach would be to 
use the 'js' Admin option to include a bunch of custom Javascript.  
This would add an event handler to the State drop down to detect any 
change.  When that drop down is changed, it would then do some Ajax to 
a specialised view function to get the list of Cities for the newly 
selected State and rewrite the contents of the Cite <select> field.

Have fun!

Luke

-- 
"Adversity: That which does not kill me only postpones the inevitable." 
(despair.com)

Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to