On Thu, Nov 2, 2017 at 12:57 PM, fábio andrews rocha marques <
fabioandrewsrochamarq...@gmail.com> wrote:

> To use django forms is to use the django Form class and it's components on
> a view? How will this solve the issue? If i use the components, don't i
> have to re-render the page when a user makes an error on the form?
>
>
Are you submitting and rendering the information entirely via JavaScript?
That would be the only case where you may get errant messages on the same
page where the user submitted the form. You'll need to examine your JS
workflow, as that is not a Django issue.

You'll integrate the form usage within your view. The Django tutorial
covers this using both function-based views and class-based views. You
should do this even when submitting the information via AJAX/JS, but the
page doesn't necessarily need to be redirected because your JS will handle
re-rendering the page properly. I'd recommend the Django Rest Framework
package in that case.

-James

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2Be%2BciVaD43g-u4tXc_Org%3DnX6%2BJuAdu1w%3Dtq0viQ9RA5gWYvQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to