2014-10-01 17:31:10 +04:00
|
|
|
from django.views.generic import TemplateView
|
2016-01-05 03:29:47 +03:00
|
|
|
from django.conf.urls import url
|
2014-10-01 16:13:21 +04:00
|
|
|
|
2015-08-07 13:54:45 +03:00
|
|
|
from .views import RegisterView, VerifyEmailView
|
2014-10-01 16:13:21 +04:00
|
|
|
|
2016-01-05 03:29:47 +03:00
|
|
|
urlpatterns = [
|
2015-08-07 13:54:45 +03:00
|
|
|
url(r'^$', RegisterView.as_view(), name='rest_register'),
|
|
|
|
url(r'^verify-email/$', VerifyEmailView.as_view(), name='rest_verify_email'),
|
2014-10-01 17:31:10 +04:00
|
|
|
|
2014-11-12 13:18:21 +03:00
|
|
|
# This url is used by django-allauth and empty TemplateView is
|
2014-10-14 16:56:00 +04:00
|
|
|
# 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:
|
2016-02-29 14:53:08 +03:00
|
|
|
# django-allauth https://github.com/pennersr/django-allauth/blob/master/allauth/account/views.py#L190
|
2016-07-28 21:14:26 +03:00
|
|
|
url(r'^account-confirm-email/(?P<key>[-:\w]+)/$', TemplateView.as_view(),
|
2014-10-01 17:31:10 +04:00
|
|
|
name='account_confirm_email'),
|
2016-01-05 03:29:47 +03:00
|
|
|
]
|