**

i'm working on Djnago and i need to know how can i get selected value in 
forms.ChoiceField

class FilterForm(forms.Form):
    Continent = forms.ChoiceField(choices=continents())

i tried with :

def affiche_all(request, currency):
    if request.method == 'POST':                                                
                                                                                
                 
        form = FilterForm(request.POST)                                         
                                                                                
                   
        if form.is_valid() : 
            Continent = form.cleaned_data['Continent']
            Continent = dict(form.fields['Continent'])[Continent]
            url = reverse('affiche_all', args=(),   kwargs={'continent': 
Continent})
            return HttpResponseRedirect(url)

but Continent always return the last value in ChoiceField and what i need 
is the selected one any suggestions?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to