Permalink
Browse files

Fix url tags in templates for django 1.5

  • Loading branch information...
1 parent 34b0417 commit 0eda5bd4fc562a2fd3e5d2e040ddfbce1d1c043b @meldra committed Apr 2, 2013
@@ -7,15 +7,15 @@
<h1>{% trans 'Sign In' %}</h1>
</div>
<div data-role="content" data-theme="c" title="{% trans 'Sign In' %}">
- <a href="{% url socialauth_begin 'google-oauth2' %}{% if next_url and next_param %}?{{ next_param }}={{ next_url }}{% endif %}"
+ <a href="{% url 'socialauth_begin' 'google-oauth2' %}{% if next_url and next_param %}?{{ next_param }}={{ next_url }}{% endif %}"
id="sp-google-button" data-ajax="false" data-role="button" data-theme="b" data-icon="custom"
data-iconshadow="false">{% trans "Google" %}</a>
- <a href="{% url socialauth_begin 'twitter' %}{% if next_url and next_param %}?{{ next_param }}={{ next_url }}{% endif %}"
+ <a href="{% url 'socialauth_begin' 'twitter' %}{% if next_url and next_param %}?{{ next_param }}={{ next_url }}{% endif %}"
id="sp-twitter-button" data-ajax="false" data-role="button" data-theme="b" data-icon="custom"
data-iconshadow="false">{% trans "Twitter" %}</a>
- <a href="{% url socialauth_begin 'facebook' %}{% if next_url and next_param %}?{{ next_param }}={{ next_url }}{% endif %}"
+ <a href="{% url 'socialauth_begin' 'facebook' %}{% if next_url and next_param %}?{{ next_param }}={{ next_url }}{% endif %}"
id="sp-facebook-button" data-ajax="false" data-role="button" data-theme="b" data-icon="custom"
data-iconshadow="false">{% trans "Facebook" %}</a>
</div>
{% endblock %}
-{% block footer %}{% endblock %}
+{% block footer %}{% endblock %}
@@ -7,13 +7,13 @@
<h1>{% trans 'Really Delete?' %}</h1>
</div>
<div data-role="content" data-theme="c" title="{% trans 'Really Delete?' %}">
- <a href="{% url sp_profile_edit_page %}" data-role="button" data-theme="b">{% trans "Keep Account" %}</a>
+ <a href="{% url 'sp_profile_edit_page' %}" data-role="button" data-theme="b">{% trans "Keep Account" %}</a>
<br>
- <form action="{% url sp_delete_page %}" method="post" data-ajax="false">
+ <form action="{% url 'sp_delete_page' %}" method="post" data-ajax="false">
{% csrf_token %}
<input type="submit" data-theme="e" data-mini="true" value="{% trans 'Delete Account & All Data' %}">
</form>
</div>
{% endblock %}
-{% block footer %}{% endblock %}
+{% block footer %}{% endblock %}
@@ -19,7 +19,7 @@ <h1 class="ui-title">{% trans "Profile" %}</h1>
{% if user.social_profile.image_url %}
<img src="{{ user.social_profile.image_url }}"/>
{% endif %}
- <form action="{% url sp_profile_edit_page %}" method="post" id="sp-profile-form" data-ajax="false">
+ <form action="{% url sp_profile_edit_page %}" method="post" id="sp-profile-form" data-ajax="false">
{% csrf_token %}
<ul>
{{ form.as_ul }}
@@ -48,4 +48,4 @@ <h3 style="margin-left:10px;">{% trans "Social Connections" %}</h3>
<br>
<a href="{% url sp_delete_page %}" data-role="button" data-theme="e">{% trans "Delete Account" %}</a>
</section>
-{% endblock %}
+{% endblock %}
@@ -11,7 +11,7 @@
<h1>{% trans "Profile" %}</h1>
{% if request.user.username == form.username.value %}
- <a href="{% url sp_profile_edit_page %}?returnTo={{ form.returnTo.value }}" data-role="button"
+ <a href="{% url 'sp_profile_edit_page' %}?returnTo={{ form.returnTo.value }}" data-role="button"
data-mini="true" data-ajax="false">{% trans "Edit" %}</a>
{% endif %}
</header>
@@ -2,13 +2,13 @@
<div data-role="navbar">
<ul>
{% if user.is_authenticated %}
- <li><a href="{% url sp_demo_home_page %}" data-icon="home">Home</a></li>
- <li><a href="{% url sp_profile_view_page %}?returnTo={{ request.path }}" data-icon="gear">Profile</a></li>
- <li><a href="{% url sp_logout_page %}" data-icon="delete">Sign Out</a></li>
+ <li><a href="{% url 'sp_demo_home_page' %}" data-icon="home">Home</a></li>
+ <li><a href="{% url 'sp_profile_view_page' %}?returnTo={{ request.path }}" data-icon="gear">Profile</a></li>
+ <li><a href="{% url 'sp_logout_page' %}" data-icon="delete">Sign Out</a></li>
{% else %}
- <li><a href="{% url sp_demo_home_page %}" data-icon="home">Home</a></li>
- <li><a href="{% url sp_select_page %}" data-icon="save">Sign In</a></li>
+ <li><a href="{% url 'sp_demo_home_page' %}" data-icon="home">Home</a></li>
+ <li><a href="{% url 'sp_select_page' %}" data-icon="save">Sign In</a></li>
{% endif %}
</ul>
</div>
-</header>
+</header>
@@ -18,10 +18,10 @@
<p>If you don't have an account yet, signing in with one of those methods will create one for you.</p>
<p>You can edit your profile or delete your account at any time.</p>
- <a href="{% url sp_demo_secure_page %}" data-role="button" data-ajax="false">Get Started</a>
+ <a href="{% url 'sp_demo_secure_page' %}" data-role="button" data-ajax="false">Get Started</a>
{% else %}
<h2>Thank you for signing in, {{ user.username }}.</h2>
- <a href="{% url sp_demo_secure_page %}" data-role="button" data-ajax="false">Return to Secure Area</a>
+ <a href="{% url 'sp_demo_secure_page' %}" data-role="button" data-ajax="false">Return to Secure Area</a>
{% endif %}
</section>
{% endblock %}
@@ -14,6 +14,6 @@
<p>Click the "Profile" button above to view and edit your profile.</p>
- <p>There is <a href="{% url sp_demo_secure_page_too %}">another secure page</a> you can visit as well.</p>
+ <p>There is <a href="{% url 'sp_demo_secure_page_too' %}">another secure page</a> you can visit as well.</p>
</section>
-{% endblock %}
+{% endblock %}
@@ -10,6 +10,6 @@
<section title="Welcome" data-role="content">
<h2>Welcome to the SECOND secure area.</h2>
- <p>Return to the <a href="{% url sp_demo_secure_page %}">main secure page.</a></p>
+ <p>Return to the <a href="{% url 'sp_demo_secure_page' %}">main secure page.</a></p>
</section>
-{% endblock %}
+{% endblock %}

0 comments on commit 0eda5bd

Please sign in to comment.