mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-11-25 02:23:44 +03:00
37375461df
+ Add comments by @chubz regarding django-allauth hmac pattern from PR #233 + Cleanup
24 lines
1.0 KiB
Python
24 lines
1.0 KiB
Python
from django.views.generic import TemplateView
|
|
from django.conf.urls import url
|
|
|
|
from .views import RegisterView, VerifyEmailView
|
|
|
|
urlpatterns = [
|
|
url(r'^$', RegisterView.as_view(), name='rest_register'),
|
|
url(r'^verify-email/$', VerifyEmailView.as_view(), name='rest_verify_email'),
|
|
|
|
# This url is used by django-allauth and empty TemplateView is
|
|
# defined just to allow reverse() call inside app, for example when email
|
|
# with verification link is being sent, then it's required to render email
|
|
# content.
|
|
|
|
# account_confirm_email - You should override this view to handle it in
|
|
# your API client somehow and then, send post to /verify-email/ endpoint
|
|
# with proper key.
|
|
# If you don't want to use API on that step, then just use ConfirmEmailView
|
|
# view from:
|
|
# django-allauth https://github.com/pennersr/django-allauth/blob/master/allauth/account/views.py
|
|
url(r'^account-confirm-email/(?P<key>[-:\w]+)/$', TemplateView.as_view(),
|
|
name='account_confirm_email'),
|
|
]
|