From fff8a4e1d221eb3bea4de6200959865de20296a7 Mon Sep 17 00:00:00 2001 From: Simon Meers Date: Fri, 15 Mar 2013 21:52:45 +1100 Subject: [PATCH] Update {% url %} syntax. Not bothering with loading from future for now. --- avatar/templates/avatar/add.html | 2 +- avatar/templates/avatar/change.html | 4 ++-- avatar/templates/avatar/confirm_delete.html | 4 ++-- .../templates/notification/avatar_friend_updated/notice.html | 2 +- setup.py | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/avatar/templates/avatar/add.html b/avatar/templates/avatar/add.html index a62df6c..9b4fed6 100644 --- a/avatar/templates/avatar/add.html +++ b/avatar/templates/avatar/add.html @@ -7,7 +7,7 @@ {% if not avatars %}

{% trans "You haven't uploaded an avatar yet. Please upload one now." %}

{% endif %} -
+ {{ upload_avatar_form.as_p }}

{% csrf_token %}

diff --git a/avatar/templates/avatar/change.html b/avatar/templates/avatar/change.html index 321da0d..8d27359 100644 --- a/avatar/templates/avatar/change.html +++ b/avatar/templates/avatar/change.html @@ -7,14 +7,14 @@ {% if not avatars %}

{% trans "You haven't uploaded an avatar yet. Please upload one now." %}

{% else %} -
+

{% csrf_token %}

{% endif %} -
+ {{ upload_avatar_form.as_p }}

{% csrf_token %}

diff --git a/avatar/templates/avatar/confirm_delete.html b/avatar/templates/avatar/confirm_delete.html index 5c54a7d..f81c815 100644 --- a/avatar/templates/avatar/confirm_delete.html +++ b/avatar/templates/avatar/confirm_delete.html @@ -4,10 +4,10 @@ {% block content %}

{% trans "Please select the avatars that you would like to delete." %}

{% if not avatars %} - {% url avatar_change as avatar_change_url %} + {% url 'avatar_change' as avatar_change_url %}

{% blocktrans %}You have no avatars to delete. Please upload one now.{% endblocktrans %}

{% else %} -
+ diff --git a/avatar/templates/notification/avatar_friend_updated/notice.html b/avatar/templates/notification/avatar_friend_updated/notice.html index 6d9b8c0..79c5d54 100644 --- a/avatar/templates/notification/avatar_friend_updated/notice.html +++ b/avatar/templates/notification/avatar_friend_updated/notice.html @@ -1,2 +1,2 @@ -{% load i18n %}{% url profile_detail username=user.username as user_url %}{# TODO: support custom user models via get_username #} +{% load i18n %}{% url 'profile_detail' username=user.username as user_url %}{# TODO: support custom user models via get_username; actually, is this template even used anymore? #} {% blocktrans with user as avatar_creator and avatar.get_absolute_url as avatar_url %}{{ avatar_creator }} has updated their avatar {{ avatar }}.{% endblocktrans %} diff --git a/setup.py b/setup.py index 7dc32ca..2df6037 100644 --- a/setup.py +++ b/setup.py @@ -33,7 +33,7 @@ that are required. A minimal integration can work like this: 3. Somewhere in your template navigation scheme, link to the change avatar page:: - Change your avatar + Change your avatar 4. Wherever you want to display an avatar for a user, first load the avatar template tags::