Try django message framework
On Jan 12, 2018 10:38, "Ruchit Bhatt" <[email protected]> wrote:
> Hi
> I have made form for signup using Django 2.0 as below
>
> <form action="" method="POST"> {% csrf_token %}
> {% for non_field_error in form.non_field.errors %}
> <p> {{ non_field_error }} </p>
> {% endfor %}
> {% for field in form %}
> {{ field }}
> {% if field.help_text %}
> {% autoescape off %}
> <p> {{ field.help_text }} </p>
> {% endautoescape %}
> {% endif %}
> {% for error in field.errors %}
> {% autoescape off %}
> <p> {{ error }} </p>
> {% endautoescape %}
> {% endfor %}
> {% endfor %}
> <input type="submit" id="submitBtn" value="SIGN UP"/>
>
> Now i want to know how can i style error list and help text using css
> (which can work in all device) ?
> And is it good practice to render each and every input field, errors &
> help separately (one by one using for loop) ?
>
>
>
> --
> 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 https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/93706232-0298-4b16-98b7-723986f0c777%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/93706232-0298-4b16-98b7-723986f0c777%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 [email protected].
To post to this group, send email to [email protected].
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/CAEFKsYPVind1i-aBuUm99A-Wt%2Bkt29C18YdKdG9McrVu4Ydq1g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.