Cascading forms in Django / else using any Python system

Can someone provide an example written in Python (preferred django) with ajax for cascading forms? Cascading forms are basically forms whose field values ​​change if and when another field value changes. Example Select a country and then the states change ...

+3
source share
2 answers

This is (mostly) an interface.

As you may have noticed, Django is trying to leave all the AJAX elements up to you, so I don’t think you will find anything built in for this.

, JS ( , , , ), django-base, JS :

def get_states(request, country):
    # work out which states are available
    #import simplesjon as sj
    return sj.... 

AJAX onchange select ( , ) JSON.

10- jquery simplejson.

+3

. ( /?) ( > 1000), .

, JavaScript ( JSON) , .

+1

All Articles