Skip to content

Commit

Permalink
Move URL tags to inside content blocks
Browse files Browse the repository at this point in the history
It appears that {% url ... as ... %} variable definitions do not work
if defined outside the {% block content %} scope.  Move the url
definitions inside the block.  Fixes issue #16.
  • Loading branch information
yourcelf committed Oct 19, 2013
1 parent d8d63b5 commit b09eac4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion registration_defaults/templates/registration/activate.html
@@ -1,8 +1,8 @@
{% extends "registration/registration_base.html" %}
{% load i18n %}
{% url 'auth_login' as auth_login_url %}
{% block title %}{% if account %}{% trans "Activation complete" %}{% else %}{% trans "Activation problem" %}{% endif %}{% endblock %}
{% block content %}
{% url 'auth_login' as auth_login_url %}
{% if account %}
{% blocktrans %}
Thanks {{ account }}, activation complete!
Expand Down
@@ -1,8 +1,8 @@
{% extends "registration/registration_base.html" %}
{% load i18n %}
{% url 'auth_login' as auth_login_url %}
{% block title %}{% trans "Activation complete" %}{% endblock %}
{% block content %}
{% url 'auth_login' as auth_login_url %}
{% blocktrans %}
Thanks, activation complete! You may now <a href='{{ auth_login_url }}'>login</a> using the username and password you set at registration.
{% endblocktrans %}
Expand Down
4 changes: 2 additions & 2 deletions registration_defaults/templates/registration/login.html
@@ -1,9 +1,9 @@
{% extends "registration/registration_base.html" %}
{% load i18n %}
{% url 'auth_password_reset' as auth_pwd_reset_url %}
{% url 'registration_register' as register_url%}
{% block title %}{% trans "Login" %}{% endblock %}
{% block content %}
{% url 'auth_password_reset' as auth_pwd_reset_url %}
{% url 'registration_register' as register_url%}

{% if form.errors %}
<p>{% blocktrans %}Your username and password didn't match. Please try again.{% endblocktrans %}</p>
Expand Down

0 comments on commit b09eac4

Please sign in to comment.