diff --git a/avatar/templates/avatar/change.html b/avatar/templates/avatar/change.html index f3c9c8a014..345e4a8783 100644 --- a/avatar/templates/avatar/change.html +++ b/avatar/templates/avatar/change.html @@ -2,9 +2,11 @@ {% load i18n avatar_tags %} {% block main_panel %} -

添加或修改头像

+

修改头像

{% trans "Your current avatar: " %}

{% avatar user %} + + {% comment %} {% if not avatars %}

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

{% else %} @@ -16,6 +18,8 @@

{% csrf_token %}

{% endif %} + {% endcomment %} +
{% for boundfield in upload_avatar_form %} diff --git a/avatar/urls.py b/avatar/urls.py index 0ddc942539..344fd23ffc 100644 --- a/avatar/urls.py +++ b/avatar/urls.py @@ -3,6 +3,6 @@ from django.conf.urls.defaults import patterns, url urlpatterns = patterns('avatar.views', url('^add/$', 'add', name='avatar_add'), url('^change/$', 'change', name='avatar_change'), - url('^delete/$', 'delete', name='avatar_delete'), +# url('^delete/$', 'delete', name='avatar_delete'), url('^render_primary/(?P[\+\w]+)/(?P[\d]+)/$', 'render_primary', name='avatar_render_primary'), ) diff --git a/profile/templates/profile/user_ids.html b/profile/templates/profile/user_ids.html index c94dd40206..c79e37c788 100644 --- a/profile/templates/profile/user_ids.html +++ b/profile/templates/profile/user_ids.html @@ -6,7 +6,6 @@ {% endblock %} diff --git a/settings.py b/settings.py index 95c08a116e..6e8e3b87e5 100644 --- a/settings.py +++ b/settings.py @@ -178,6 +178,7 @@ AVATAR_STORAGE_DIR = 'avatars' AVATAR_GRAVATAR_BACKUP = False AVATAR_DEFAULT_URL = '/avatars/default.png' AUTO_GENERATE_AVATAR_SIZES = (80, 16) +AVATAR_MAX_AVATARS_PER_USER = 1 LOGIN_URL = SITE_ROOT + 'accounts/login' diff --git a/templates/base.html b/templates/base.html index c4ecff419f..2d8b5b33b3 100644 --- a/templates/base.html +++ b/templates/base.html @@ -25,7 +25,7 @@ {% endif %} {% if request.user.is_authenticated %} - 欢迎, {% avatar request.user 16 %} {{ request.user }} + 欢迎, {% avatar request.user 16 %} {{ request.user }} 设置