From 0dab0c641cfd6efc565acc8d6f247168d4dc4737 Mon Sep 17 00:00:00 2001 From: Slava Kyrachevsky Date: Thu, 19 Jan 2017 09:46:47 +0200 Subject: [PATCH] =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=B5=D0=B2=D0=BE=D0=B4=20?= =?UTF-8?q?=D0=BD=D0=B0=20=D1=81=D1=82=D1=80=20=D0=BD=D0=B0=D1=81=D1=82?= =?UTF-8?q?=D1=80=D0=BE=D0=B5=D0=BA=20=D0=B2=20=D0=9B=D0=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 2 +- accounts/forms.py | 8 +- templates/client/accounts/settings.html | 145 ++++++++++++------------ 3 files changed, 76 insertions(+), 79 deletions(-) diff --git a/Makefile b/Makefile index 772dc2a0..f622132d 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,7 @@ compilemessages: -@ipython manage.py compilemessages collectstatic: - @ipython manage.py collectstatic + @ipython manage.py collectstatic --noinput user: -@ipython manage.py createsuperuser diff --git a/accounts/forms.py b/accounts/forms.py index f988485f..43cfa1a7 100644 --- a/accounts/forms.py +++ b/accounts/forms.py @@ -7,7 +7,7 @@ from random import choice from django import forms from django.contrib.auth.forms import ReadOnlyPasswordHashField from django.forms.util import ErrorList -from django.utils.translation import ugettext as _ +from django.utils.translation import ugettext as _, ugettext_lazy from django.conf import settings from models import User from django.db.models import Q @@ -161,14 +161,14 @@ class ChangePasswordForm(forms.Form): """ old_password = forms.CharField(label=_(u'Old password'), required=True, widget=forms.PasswordInput(render_value=False, - attrs={'placeholder': _(u'Введите старый пароль')})) + attrs={'placeholder': ugettext_lazy(u'Введите старый пароль')})) new_password = forms.CharField(label=_(u'New password'), required=True, widget=forms.PasswordInput(render_value=False, - attrs={'placeholder': _(u'Придумайте новый пароль')})) + attrs={'placeholder': ugettext_lazy(u'Придумайте новый пароль')})) new_password_confirm = forms.CharField(label=_(u'Confirm password'), required=True, widget=forms.PasswordInput(render_value=False, attrs={ - 'placeholder': _(u'Повторите новый пароль')})) + 'placeholder': ugettext_lazy(u'Повторите новый пароль')})) def clean(self): data = super(ChangePasswordForm, self).clean() diff --git a/templates/client/accounts/settings.html b/templates/client/accounts/settings.html index 14c1d069..3095fc37 100644 --- a/templates/client/accounts/settings.html +++ b/templates/client/accounts/settings.html @@ -1,7 +1,5 @@ {% extends 'client/base_catalog.html' %} -{% load static %} -{% load i18n %} - +{% load static i18n %} {% block bread_scrumbs %} {% endblock %} - {% block content_list %} {% if user.email %}
-
{% trans 'смена пароля' %}
-
-
{% csrf_token %} -
-
+
{% trans 'смена пароля' %}
+
+ {% csrf_token %} +
+
{{ change_password_form.old_password }} -
-
+
+
-
-
+
+
{{ change_password_form.new_password }} -
+
-
+
{{ change_password_form.new_password_confirm }} -
+
-
+
@@ -48,68 +45,68 @@
-
- -
- -
-
+
+ +
+ +
+
{% endif %} {#
#} @@ -245,7 +242,7 @@ }); }); - + {% endblock %} {% endblock %}