Monday, October 27, 2014

Re: View didn't return an HttpResponse object

Hello,

The messages framework might be helpful here.

from django.contrib import messages
messages
.add_message(request, messages.INFO, 'Password was changed')
return logout_then_login(request, login_url='/login/')

<h2> Logowanie na stronie Managera Piłkarskiego GoalKick </>
<p>
{% for message in messages %}
<p>{{ message }}</p>
{% endfor %}

https://docs.djangoproject.com/en/dev/ref/contrib/messages/#using-messages-in-views-and-templates

Collin

--
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+unsubscribe@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/cc51e6df-eca2-4e51-8cd8-c7622d362666%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment