From 53067fc729b439c035d0d0736cb74ba21c8d9758 Mon Sep 17 00:00:00 2001 From: Edward Ribeiro Date: Mon, 5 Dec 2016 12:16:33 -0200 Subject: [PATCH 1/7] =?UTF-8?q?Refatora=20colab=20para=20backend=20django?= =?UTF-8?q?=20provis=C3=B3rio?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/accounts/forms.py | 50 +++++++++++++- src/accounts/templates/novo_login.html | 57 ++++++++++++++++ .../password_change_form_custom.html | 60 +++++++++++++++++ .../password_reset_complete_custom.html | 8 +++ .../password_reset_confirm_custom.html | 63 ++++++++++++++++++ .../password_reset_done_custom.html | 8 +++ .../password_reset_email_custom.html | 15 +++++ .../password_reset_form_custom.html | 52 +++++++++++++++ .../resend_email_verification.html | 51 ++++++++++++++ src/accounts/urls.py | 34 ++++++++-- src/accounts/views.py | 25 ++++++- src/colab/custom_settings.py | 52 ++++++++------- src/colab/local_settings-dev.py | 11 ++- src/colab/settings.py | 14 +++- src/locale/pt_BR/LC_MESSAGES/django.mo | Bin 16219 -> 16383 bytes src/locale/pt_BR/LC_MESSAGES/django.po | 1 - src/proxy/views.py | 4 +- src/super_archives/models.py | 7 +- src/templates/base.html | 9 ++- 19 files changed, 475 insertions(+), 46 deletions(-) create mode 100644 src/accounts/templates/novo_login.html create mode 100644 src/accounts/templates/registration/password_change_form_custom.html create mode 100644 src/accounts/templates/registration/password_reset_complete_custom.html create mode 100644 src/accounts/templates/registration/password_reset_confirm_custom.html create mode 100644 src/accounts/templates/registration/password_reset_done_custom.html create mode 100644 src/accounts/templates/registration/password_reset_email_custom.html create mode 100644 src/accounts/templates/registration/password_reset_form_custom.html create mode 100644 src/accounts/templates/registration/resend_email_verification.html diff --git a/src/accounts/forms.py b/src/accounts/forms.py index f55d13ab..d8ecdf10 100644 --- a/src/accounts/forms.py +++ b/src/accounts/forms.py @@ -44,9 +44,57 @@ def __init__(self, *args, **kwargs): class UserCreationForm(UserForm): + password = forms.CharField( + max_length=128, + widget=forms.PasswordInput()) + + confirm_password = forms.CharField( + max_length=128, + widget=forms.PasswordInput()) class Meta: model = User - fields = ('first_name', 'last_name', 'email', 'username') + fields = ('first_name', + 'last_name', + 'email', + 'username', + 'password', + 'confirm_password') + + def clean(self): + super(UserCreationForm, self).clean() + data = self.cleaned_data + + username = data.get('username') + + if User.objects.filter(username=username).exists(): + raise forms.ValidationError( + 'Esse nome de usuário já existe.') + + if not 'password' in data or not 'confirm_password' in data: + raise forms.ValidationError( + 'Preencha os campos de senha') + + senha = self.cleaned_data['password'] + confirma_senha = self.cleaned_data['confirm_password'] + + if senha != confirma_senha: + raise forms.ValidationError('As senhas não conferem.') + + + return self.cleaned_data + + def save(self, commit=False): + user = User.objects.create( + first_name=self.cleaned_data['first_name'], + last_name=self.cleaned_data['last_name'], + email=self.cleaned_data['email'], + username=self.cleaned_data['username']) + + user.set_password(self.cleaned_data['password']) + + user.save() + + return user class UserUpdateForm(UserForm): diff --git a/src/accounts/templates/novo_login.html b/src/accounts/templates/novo_login.html new file mode 100644 index 00000000..2541b834 --- /dev/null +++ b/src/accounts/templates/novo_login.html @@ -0,0 +1,57 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block title %}Login{% endblock %} + +{% block main-content %} +
+
+
+ + +
+
+
+ + +{% endblock %} diff --git a/src/accounts/templates/registration/password_change_form_custom.html b/src/accounts/templates/registration/password_change_form_custom.html new file mode 100644 index 00000000..7c09c0d4 --- /dev/null +++ b/src/accounts/templates/registration/password_change_form_custom.html @@ -0,0 +1,60 @@ +{% extends "base.html" %} +{% load i18n %} +{% block main-content %} + +
+ {% if form.errors %} +
+ + {% if form.errors.items|length == 1 %} + {% trans "Please correct the error below and try again." %} + {% else %} + {% trans "Please correct the errors below and try again." %} + {% endif %} + +
+ {% endif %} +
+ +
+
+ {% csrf_token %} + +
+
+
+

{% trans 'Change Password' %}

+ +
+
+ Nova senha + + {{ form.old_password.errors }} +
+ +
+ {{ form.new_password1.label_tag }} + + {{ form.new_password1.errors }} +
+ +
+ {{ form.new_password2.label_tag }} + + {{ form.new_password2.errors }} +
+ +
+
+
+
+ +
+
+ +
+ +
+
+ +{% endblock %} diff --git a/src/accounts/templates/registration/password_reset_complete_custom.html b/src/accounts/templates/registration/password_reset_complete_custom.html new file mode 100644 index 00000000..5c2ea207 --- /dev/null +++ b/src/accounts/templates/registration/password_reset_complete_custom.html @@ -0,0 +1,8 @@ +{% extends "base.html" %} + +{% block pagetitle %}Recuperação de senha concluída{% endblock %} + +{% block main-content %} +

Sua senha foi modificada com sucesso. Clique aqui para fazer o login.

+ +{% endblock %} diff --git a/src/accounts/templates/registration/password_reset_confirm_custom.html b/src/accounts/templates/registration/password_reset_confirm_custom.html new file mode 100644 index 00000000..10e40f28 --- /dev/null +++ b/src/accounts/templates/registration/password_reset_confirm_custom.html @@ -0,0 +1,63 @@ +{% extends "base.html" %} +{% load i18n %} +{% block pagetitle %}{% trans "Criar nova senha" %}{% endblock %} +{% block main-content %} + {% if validlink %} + +
+ {% if form.errors %} +
+ + {% if form.errors.items|length == 1 %} + {% trans "Por favor, corrija o erro e tente novamente." %} + {% else %} + {% trans "Por favor, corrija os erros e tente novamente." %} + {% endif %} + +
+ {% endif %} +
+ +
+
+ {% csrf_token %} + +
+
+
+

{% trans 'Modificar Senha' %}

+ +
+ +
+ Senha + + {{ form.new_password1.errors }} +
+ +
+ Confirmar Senha + + {{ form.new_password2.errors }} +
+ +
+
+
+
+ +
+
+ +
+ +
+
+ {% else %} +

A troca de senha não obteve sucesso.

+

O link é inválido, + provavelmente ele já foi utilizado.
+ Por favor, solicite uma nova recuperação de senha.

+ {% endif %} + +{% endblock %} diff --git a/src/accounts/templates/registration/password_reset_done_custom.html b/src/accounts/templates/registration/password_reset_done_custom.html new file mode 100644 index 00000000..c12f557d --- /dev/null +++ b/src/accounts/templates/registration/password_reset_done_custom.html @@ -0,0 +1,8 @@ +{% extends "base.html" %} + +{% block pagetitle %}Recuperação de senha enviada com sucesso{% endblock %} + +{% block main-content %} +

Nós enviamos as instruções de recuperação de senha para o e-mail informado.

+

Você deve recebê-lo em breve. Caso não receba, verifique sua caixa de spam.

+{% endblock %} diff --git a/src/accounts/templates/registration/password_reset_email_custom.html b/src/accounts/templates/registration/password_reset_email_custom.html new file mode 100644 index 00000000..eb7f87ec --- /dev/null +++ b/src/accounts/templates/registration/password_reset_email_custom.html @@ -0,0 +1,15 @@ +{% autoescape off %} +Você está recebendo este e-mail porque requisitou uma troca de senha no site {{ site_name }}. + +Por favor, clique no link abaixo e preencha o formulário: +{% block reset_link %} +{{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %} +{% endblock %} + +Seu nome de usuário, caso tenha esquecido: {{ user.username }} + +Obrigado por usar nosso sistema! + +Equipe Colab. + +{% endautoescape %} diff --git a/src/accounts/templates/registration/password_reset_form_custom.html b/src/accounts/templates/registration/password_reset_form_custom.html new file mode 100644 index 00000000..d721db60 --- /dev/null +++ b/src/accounts/templates/registration/password_reset_form_custom.html @@ -0,0 +1,52 @@ +{% extends "base.html" %} +{% load i18n %} +{% block main-content %} + + +
+ {% if form.errors %} +
+ {% trans "Por favor, corrija os campos destacados e tente novamente." %} +
+ {% endif %} +
+ +
+
+ {% csrf_token %} + +
+
+
+

{{ title }}

+
+
{% trans "Esqueceu sua senha? Insira seu endereço de e-mail abaixo, e nós iremos enviar uma mensagem com as instruções para gerar uma nova." %}
+
+
+ + + {{ form.email.errors }} +
+
+
+
+
+ +
+
+

+
+
+ +
+ +{% endblock %} + + + + + + + + + diff --git a/src/accounts/templates/registration/resend_email_verification.html b/src/accounts/templates/registration/resend_email_verification.html new file mode 100644 index 00000000..cd5ef24f --- /dev/null +++ b/src/accounts/templates/registration/resend_email_verification.html @@ -0,0 +1,51 @@ +{% extends "base.html" %} +{% load i18n %} +{% block main-content %} + +
+ {% if form.errors %} +
+ {% trans "Please correct the errors below and try again." %} +
+ {% endif %} +
+ +
+
+ {% csrf_token %} + +
+
+
+

{{ title }}

+
+
{% trans "Enter your email address below, and we'll resend an email verification." %}
+
+
+ + + {{ form.email.errors }} +
+
+
+
+
+ +
+
+

+
+
+ +
+ +{% endblock %} + + + + + + + + + diff --git a/src/accounts/urls.py b/src/accounts/urls.py index b7788d54..942f78d3 100644 --- a/src/accounts/urls.py +++ b/src/accounts/urls.py @@ -1,17 +1,43 @@ from django.conf.urls import patterns, include, url +from django.contrib.auth import views as auth_views +from django.contrib.auth.views import login from .views import (UserProfileDetailView, UserProfileUpdateView, - ManageUserSubscriptionsView, ChangeXMPPPasswordView) + ManageUserSubscriptionsView, ChangeXMPPPasswordView, + password_reset_done_custom, password_reset_complete_custom) urlpatterns = patterns('', url(r'^register/$', 'accounts.views.signup', name='signup'), - url(r'^change-password/$', - ChangeXMPPPasswordView.as_view(), name='change_password'), + url(r'^novo-login/$', + login, + {'template_name': 'novo_login.html', + 'redirect_field_name': 'previous_path'}, + name='novo_login'), - url(r'^logout/?$', 'django.contrib.auth.views.logout'), + url(r'^password-reset/$', auth_views.password_reset, + {'template_name': 'registration/password_reset_form_custom.html', + 'email_template_name':'registration/password_reset_email_custom.html'}, + name="password_reset"), + + url(r'^password-reset-done/?$', password_reset_done_custom, + name="password_reset_done"), + + url(r'^password-reset-confirm/(?P[0-9A-Za-z]+)-(?P.+)/$', + auth_views.password_reset_confirm, + {'template_name': 'registration/password_reset_confirm_custom.html'}, + name="password_reset_confirm"), + + url(r'^password-reset-complete/$', 'accounts.views.password_reset_complete_custom', + name="password_reset_complete"), + + url(r'^change-password/?$', auth_views.password_change, + {'template_name': 'registration/password_change_form_custom.html'}, + name='password_change'), + + url(r'^logout/?$', 'django.contrib.auth.views.logout', {'next_page': '/'}, name='novo_logout'), url(r'^(?P[\w@+.-]+)/?$', UserProfileDetailView.as_view(), name='user_profile'), diff --git a/src/accounts/views.py b/src/accounts/views.py index 29c4fa94..a4745788 100644 --- a/src/accounts/views.py +++ b/src/accounts/views.py @@ -134,16 +134,18 @@ def signup(request): # Check if the user's email have been used previously # in the mainling lists to link the user to old messages + email_addr, created = EmailAddress.objects.get_or_create(address=user.email) + if created: email_addr.real_name = user.get_full_name() email_addr.user = user email_addr.save() - messages.success(request, _('Your profile has been created!')) - messages.warning(request, _('You must login to validated your profile. ' - 'Profiles not validated are deleted in 24h.')) + messages.success(request, _('Seu perfil foi criado com sucesso!')) + # messages.warning(request, _('You must login to validated your profile. ' + # 'Profiles not validated are deleted in 24h.')) return redirect('user_profile', username=user.username) @@ -238,3 +240,20 @@ def form_valid(self, form): _("You've changed your password successfully!") ) return response + + +def password_reset_done_custom(request): + msg = _(("Nós enviamos um email com as intrução para a " + "troca de senha. Você deve recebê-lo em breve. " + "Caso não receba, verifique sua caxa de spam. ")) + messages.success(request, msg) + + return redirect('home') + + +def password_reset_complete_custom(request): + msg = _('Sua senha foi modificada com sucesso. ' + 'Faça o login.') + messages.success(request, msg) + + return redirect('home') diff --git a/src/colab/custom_settings.py b/src/colab/custom_settings.py index 141f59ce..68b5ca4c 100644 --- a/src/colab/custom_settings.py +++ b/src/colab/custom_settings.py @@ -132,7 +132,8 @@ 'disable_existing_loggers': False, 'root': { 'level': 'WARNING', - 'handlers': ['sentry', 'console'], + #'handlers': ['sentry', 'console'], + 'handlers': ['console'], }, 'formatters': { 'verbose': { @@ -151,10 +152,10 @@ 'include_html': True, 'filters': ['require_debug_false'], }, - 'sentry': { - 'level': 'ERROR', - 'class': 'raven.contrib.django.raven_compat.handlers.SentryHandler', - }, + # 'sentry': { + # 'level': 'ERROR', + # 'class': 'raven.contrib.django.raven_compat.handlers.SentryHandler', + #}, 'console': { 'level': 'DEBUG', 'class': 'logging.StreamHandler', @@ -163,30 +164,31 @@ }, 'loggers': { 'django.request': { - 'handlers': ['mail_admins', 'sentry'], + #'handlers': ['mail_admins', 'sentry'], + 'handlers': ['mail_admins'], 'level': 'ERROR', 'propagate': True, }, - 'django.db.backends': { - 'level': 'ERROR', - 'handlers': ['sentry'], - 'propagate': False, - }, + #'django.db.backends': { + #'level': 'ERROR', + # 'handlers': ['sentry'], + # 'propagate': False, + # }, 'raven': { 'level': 'DEBUG', 'handlers': ['console'], 'propagate': False, }, - 'sentry.errors': { - 'level': 'DEBUG', - 'handlers': ['console'], - 'propagate': False, - }, - 'django_browserid': { - 'handlers': ['sentry'], - 'level': 'WARNING', - 'propagate': False, - }, + #'sentry.errors': { + # 'level': 'DEBUG', + # 'handlers': ['console'], + # 'propagate': False, + #}, + #'django_browserid': { + # 'handlers': ['sentry'], + # 'level': 'WARNING', + # 'propagate': False, + #}, 'conversejs': { 'handlers': ['console'], 'level': 'DEBUG', @@ -195,10 +197,10 @@ } } -COLAB_FROM_ADDRESS = '"Colab Interlegis" ' -SERVER_EMAIL = COLAB_FROM_ADDRESS -EMAIL_HOST = 'smtp.interlegis.leg.br' -EMAIL_PORT = 25 +# COLAB_FROM_ADDRESS = '"Colab Interlegis" ' +# SERVER_EMAIL = COLAB_FROM_ADDRESS +# EMAIL_HOST = 'smtp.interlegis.leg.br' +# EMAIL_PORT = 25 TEMPLATE_CONTEXT_PROCESSORS = ( 'django.contrib.auth.context_processors.auth', diff --git a/src/colab/local_settings-dev.py b/src/colab/local_settings-dev.py index 0f8d667c..20106e71 100644 --- a/src/colab/local_settings-dev.py +++ b/src/colab/local_settings-dev.py @@ -1,7 +1,7 @@ from custom_settings import * -DEBUG = True +DEBUG = False TEMPLATE_DEBUG = DEBUG ADMINS = ( @@ -35,6 +35,15 @@ COLAB_TRAC_URL = 'http://localhost:5000/' COLAB_CI_URL = 'http://localhost:8080/ci/' +MIDDLEWARE_CLASSES = ( + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +) + CONVERSEJS_ENABLED = False DIAZO_THEME = SITE_URL diff --git a/src/colab/settings.py b/src/colab/settings.py index 56e24e8e..10ff214f 100644 --- a/src/colab/settings.py +++ b/src/colab/settings.py @@ -20,9 +20,9 @@ SECRET_KEY = 'd%gy$gfn4z2=z414qvqouyd2h6_i8nr_m4zmlxqklu15u!8&^@' # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True +DEBUG = False -TEMPLATE_DEBUG = True +TEMPLATE_DEBUG = False ALLOWED_HOSTS = [] @@ -82,4 +82,14 @@ STATIC_URL = '/static/' MEDIA_URL = '/media/' + +EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' +EMAIL_HOST = 'smtp.interlegis.leg.br' +EMAIL_PORT = 25 +EMAIL_SEND_USER = '"Colab Interlegis"' +EMAIL_HOST_USER = '' +EMAIL_HOST_PASSWORD = '' +DEFAULT_FROM_EMAIL = '"Colab Interlegis"' + + from custom_settings import * diff --git a/src/locale/pt_BR/LC_MESSAGES/django.mo b/src/locale/pt_BR/LC_MESSAGES/django.mo index 7e27c3e77ec54bcb8d9e74e068278eb395969445..2612cbd6024bbc82ab095e43a50cdb245cdb87d2 100644 GIT binary patch delta 5241 zcmYk<33L_J0mktg2m~;MED-iEKvp1-5ZMG0BG5JglvvafK}g6`f{+AWXhfDVEp=g$ z62Sse*$o7#Vz4aA9x7?51raE#Sd_|gp!879DLvBv_vYg19KQFvcizn1=FW?rpLgGN zFGU6~Hyk%f2Qnwbn888DTnN)yV~$4|Q;8?A4bEz5Ohc@|cK8++;&yC`?OPes4CC-2 zOu@!D2%FSKzl!`bxA|yH|0aZW)y%_CUqoXX_C%J*Q$11DR^i&qlV3S=x^E*B9^FFFry&qdI%RS=4}Tp$2*v zL-8KA$0mH}`dHLJdZVsON3Fzg)b*oK1I)$1UO`B!%)ialnf988WI${*BP7J1EXB>?h_zYCXFQQha+}2m1`d#Nzh@h|&HKJP7(wstd zd>!@7>rpdnN^i*+jv7EZs^eVL0B0dj$*e(5Xg9`V4QeHBpjM_HH859qtHY+K24k#` zpa$?1>RA_{ZYV_u=i2%^s3omLUB4YQ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2rriB=*ee$a>A{ew>18Hs60!wqjd}=cX>+u<-_&1 zoP*kQs|nk|bG*;z8@7Bq_8=3;Su&WMBn!zV^5^3tP8`wve@x*38A0kv^KpwUY{fY8 ziLIZ)OGNMV{bVuGF@|WfHXlz?=xr-y_-~SI>*sMU`BdwlNR|^FBVB&~)Zc_&zt@cU zyDcxlI&vMEVbA>$Zz?N^Udsjciy;_c%Tw?r;^_TcVNZ_2$H`yGbbIb~e29E*>tY}I z8<|Zih>i}V3#lbz$sn?q1Q8vpNGKUbHj@VkhsN)I=6g!~rvNvQN#suQKk^|7BvquG zq>%-m+9ikq?0`%ZnfpE_$V1qd`T)fL(Y+% gB!xs0AL388ki*1O9&H~HP}#l9m!Xv-`c?S-28`D1J^%m! diff --git a/src/locale/pt_BR/LC_MESSAGES/django.po b/src/locale/pt_BR/LC_MESSAGES/django.po index f50197a1..8b888d43 100644 --- a/src/locale/pt_BR/LC_MESSAGES/django.po +++ b/src/locale/pt_BR/LC_MESSAGES/django.po @@ -450,7 +450,6 @@ msgid "In one month" msgstr "" #: colab/custom_settings.py:313 -#, fuzzy msgid "Never" msgstr "Seriedade" diff --git a/src/proxy/views.py b/src/proxy/views.py index eb5efcb8..42a88db0 100644 --- a/src/proxy/views.py +++ b/src/proxy/views.py @@ -12,7 +12,7 @@ DIAZO_RULES_DIR = os.path.join(CWD, 'diazo') class TracProxyView(HitCounterViewMixin, ProxyView): - base_url = settings.COLAB_TRAC_URL + upstream = settings.COLAB_TRAC_URL add_remote_user = settings.REVPROXY_ADD_REMOTE_USER diazo_theme_template = 'proxy/trac.html' diazo_rules = os.path.join(DIAZO_RULES_DIR, 'trac.xml') @@ -50,7 +50,7 @@ def get_object(self): class JenkinsProxyView(ProxyView): - base_url = settings.COLAB_CI_URL + upstream = settings.COLAB_CI_URL add_remote_user = settings.REVPROXY_ADD_REMOTE_USER diazo_theme_template = 'base.html' diazo_rules = os.path.join(DIAZO_RULES_DIR, 'jenkins.xml') diff --git a/src/super_archives/models.py b/src/super_archives/models.py index 6e4c35db..77c72dc8 100644 --- a/src/super_archives/models.py +++ b/src/super_archives/models.py @@ -300,8 +300,11 @@ def unvote(self, user): @property def url(self): """Shortcut to get thread url""" - return reverse('thread_view', args=[self.mailinglist.name, - self.thread.subject_token]) + try: + return reverse('thread_view', args=[self.mailinglist.name, + self.thread.subject_token]) + except: + return '/' @property def description(self): diff --git a/src/templates/base.html b/src/templates/base.html index 8ac87182..0d5cb836 100644 --- a/src/templates/base.html +++ b/src/templates/base.html @@ -1,5 +1,5 @@ -{% load i18n browserid conversejs gravatar %} +{% load i18n conversejs gravatar %} {% block head %} @@ -106,12 +106,12 @@ {% trans 'Login' as login_text %} - + {% else %} @@ -203,7 +203,6 @@ {% endif %} {% include "tz/set_utc_offset.html" %} - {% browserid_js %} {% block footer_js %}{% endblock %} From 21228c08b42b0bb5a4ca70c7a6c1baa5903c4ca6 Mon Sep 17 00:00:00 2001 From: Edward Ribeiro Date: Tue, 6 Dec 2016 18:49:16 -0200 Subject: [PATCH 2/7] dummy --- src/templates/base.html | 1 + 1 file changed, 1 insertion(+) diff --git a/src/templates/base.html b/src/templates/base.html index 0d5cb836..29123155 100644 --- a/src/templates/base.html +++ b/src/templates/base.html @@ -207,3 +207,4 @@ {% block footer_js %}{% endblock %} + From 6e5cb2425db623bc198c338599feef0fc64be33b Mon Sep 17 00:00:00 2001 From: Edward Ribeiro Date: Wed, 7 Dec 2016 16:13:12 -0200 Subject: [PATCH 3/7] =?UTF-8?q?Conserta=20bug=20em=20edi=C3=A7=C3=A3o=20de?= =?UTF-8?q?=20perfil?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/accounts/urls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/accounts/urls.py b/src/accounts/urls.py index 942f78d3..93908deb 100644 --- a/src/accounts/urls.py +++ b/src/accounts/urls.py @@ -35,7 +35,7 @@ url(r'^change-password/?$', auth_views.password_change, {'template_name': 'registration/password_change_form_custom.html'}, - name='password_change'), + name='change_password'), url(r'^logout/?$', 'django.contrib.auth.views.logout', {'next_page': '/'}, name='novo_logout'), From c7160b7820c3ce634a055fcdb13108fc44856b68 Mon Sep 17 00:00:00 2001 From: Edward Ribeiro Date: Mon, 9 Jan 2017 15:12:32 -0200 Subject: [PATCH 4/7] =?UTF-8?q?Conserta=20URL=20de=20mudan=C3=A7a=20de=20p?= =?UTF-8?q?assword=20do=20XMPP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/accounts/templates/accounts/user_update_form.html | 2 +- src/accounts/urls.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/accounts/templates/accounts/user_update_form.html b/src/accounts/templates/accounts/user_update_form.html index cffbf12a..4d09152e 100644 --- a/src/accounts/templates/accounts/user_update_form.html +++ b/src/accounts/templates/accounts/user_update_form.html @@ -192,7 +192,7 @@

{% trans "This feature is available only for those who need to change the password for some reason as having an old user with the same username, forgot your password to commit, usage of other XMPP Client for connection. Usually, you won't need to change this password. Only change it if you are sure about what you are doing." %}
- {% trans "Change Password" %} + {% trans "Change Password" %} diff --git a/src/accounts/urls.py b/src/accounts/urls.py index 93908deb..205c2e10 100644 --- a/src/accounts/urls.py +++ b/src/accounts/urls.py @@ -11,6 +11,10 @@ urlpatterns = patterns('', url(r'^register/$', 'accounts.views.signup', name='signup'), + url(r'^change-password-xmpp/$', + ChangeXMPPPasswordView.as_view(), + name='change_password_xmpp'), + url(r'^novo-login/$', login, {'template_name': 'novo_login.html', From 9912249569846f22fcae414f86e28d46deb3fee3 Mon Sep 17 00:00:00 2001 From: Gabriel R F Date: Wed, 5 Jun 2019 10:13:00 -0300 Subject: [PATCH 5/7] Update novo_login.html --- src/accounts/templates/novo_login.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/accounts/templates/novo_login.html b/src/accounts/templates/novo_login.html index 2541b834..bd746db8 100644 --- a/src/accounts/templates/novo_login.html +++ b/src/accounts/templates/novo_login.html @@ -9,7 +9,7 @@