Are you using form_valid method in view ?

Many thanks,

Serge


+380 636150445
skype: skhohlov

On Thu, Oct 9, 2014 at 10:10 AM, termopro <termo...@gmail.com> wrote:

> Hi,
>
> I am building a user registration page. Page has a form where user can
> select his current state and city.
>
> The problem with that is that i cannot load list of cities into the form
> when the page is being generated.
> That's because i show the user only cities from his state, not all of them.
>
> So i generate a form with a list of states and an empty 'cities'. When
> user selects one of the states, i populate 'cities' with ajax.
>
> Everything works fine, except i don't know how to validate 'cities'
> correctly and show form errors.
> What is the correct way of doing this ?
>
> --
> 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 django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/25d67c01-df04-424c-9171-88def729d3a6%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/25d67c01-df04-424c-9171-88def729d3a6%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CADTRxJNqQ1FhOKxEVF%3DXBa2mcUsFVTyY%3DTQpMTXfg1__ZyRYFA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to