See #187: API logic for password reset

This commit is contained in:
Eliot Berriot 2018-05-06 11:30:41 +02:00
parent 929b50183a
commit 22f0b1a2d8
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
4 changed files with 41 additions and 7 deletions

View file

@ -1,16 +1,20 @@
from django.views.generic import TemplateView
from django.conf.urls import url
from rest_auth.registration.views import VerifyEmailView
from rest_auth.views import PasswordChangeView
from rest_auth.registration import views as registration_views
from rest_auth import views as rest_auth_views
from .views import RegisterView
from . import views
urlpatterns = [
url(r'^$', RegisterView.as_view(), name='rest_register'),
url(r'^verify-email/$', VerifyEmailView.as_view(), name='rest_verify_email'),
url(r'^change-password/$', PasswordChangeView.as_view(), name='change_password'),
url(r'^$', views.RegisterView.as_view(), name='rest_register'),
url(r'^verify-email/$',
registration_views.VerifyEmailView.as_view(),
name='rest_verify_email'),
url(r'^change-password/$',
rest_auth_views.PasswordChangeView.as_view(),
name='change_password'),
# This url is used by django-allauth and empty TemplateView is
# defined just to allow reverse() call inside app, for example when email