Skip to content
Browse files

Fix url tags in templates for django 1.5

  • Loading branch information...
1 parent 34b0417 commit d062c27142a5b46731d96610db8f640d75affb7f @meldra committed Apr 2, 2013
View
2 README.rst
@@ -243,7 +243,7 @@ Profile Delete Auth Type
This is a default feature of django-socialauth, and is available using::
- {% url socialauth_disconnect user_social_auth.provider %}
+ {% url 'socialauth_disconnect' user_social_auth.provider %}
... in a template.
View
8 socialprofile/templates/socialprofile/sp_account_select.html
@@ -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 %}
View
6 socialprofile/templates/socialprofile/sp_delete_account_modal.html
@@ -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 %}
View
12 socialprofile/templates/socialprofile/sp_profile_edit.html
@@ -6,7 +6,7 @@
{% block header %}
<header data-role="header" data-theme="b" data-position="fixed">
- <a href="{% url sp_profile_view_page %}?returnTo={{ form.returnTo.value }}"
+ <a href="{% url 'sp_profile_view_page' %}?returnTo={{ form.returnTo.value }}"
data-role="button">{% trans "Cancel" %}</a>
<h1 class="ui-title">{% trans "Profile" %}</h1>
@@ -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 }}
@@ -34,10 +34,10 @@ <h3 style="margin-left:10px;">{% trans "Social Connections" %}</h3>
{% else %}
<ul>
{% for user_social_auth in user.social_auth.all %}
- <a href="{% url socialauth_disconnect user_social_auth.provider %}"
+ <a href="{% url 'socialauth_disconnect' user_social_auth.provider %}"
data-role="button">{% trans "Disconnect" %} {{ user_social_auth.provider|social_provider_name }}</a>
{% endfor %}
- <li><a href="{% url sp_select_page %}" data-theme="a" data-rel="dialog"
+ <li><a href="{% url 'sp_select_page' %}" data-theme="a" data-rel="dialog"
data-role="button">{% trans "Add Social Connection" %}</a></li>
</ul>
@@ -46,6 +46,6 @@ <h3 style="margin-left:10px;">{% trans "Social Connections" %}</h3>
<br>
<br>
<br>
- <a href="{% url sp_delete_page %}" data-role="button" data-theme="e">{% trans "Delete Account" %}</a>
+ <a href="{% url 'sp_delete_page' %}" data-role="button" data-theme="e">{% trans "Delete Account" %}</a>
</section>
-{% endblock %}
+{% endblock %}
View
2 socialprofile/templates/socialprofile/sp_profile_view.html
@@ -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>
View
12 socialprofile_demo/templates/header.html
@@ -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>
View
4 socialprofile_demo/templates/index.html
@@ -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 %}
View
4 socialprofile_demo/templates/secure.html
@@ -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 %}
View
4 socialprofile_demo/templates/securetoo.html
@@ -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 d062c27

Please sign in to comment.
Something went wrong with that request. Please try again.