Reputation: 12605
I am using Django 1.6. I have the following file in myApp/templates/registration/password_reset_email.html.
However, when I enter my email address in the form to send a reset password email, I get the following error:
TemplateSyntaxError at /auth/password_reset/
Could not parse the remainder: ',' from 'uid,'
What is wrong with the template below that causes the {% url %} tag to fail?
{% autoescape off %}
You're receiving this e-mail because you requested a password reset for your user account at {{ site_name }}.
Please go to the following page and choose a new password:
{% block reset_link %}
{{ protocol }}://{{ domain }}{% url django.contrib.auth.views.password_reset_confirm uidb36=uid, token=token %}
{% endblock %}
Your username, in case you've forgotten: {{ user.username }}
Thanks for using our site!
The {{ site_name }} team.
{% endautoescape %}
Upvotes: 2
Views: 129
Reputation: 5455
When you are using templatetags with several parameters, separate them by space.
Like {{ protocol }}://{{ domain }}{% url 'django.contrib.auth.views.password_reset_confirm' uidb36=uid token=token %}
(notice that there is no , after "uid".
I think that is the solution. See https://docs.djangoproject.com/en/dev/howto/custom-template-tags/ for more info about custom templatetags and how they work.
Upvotes: 3