diff --git a/rest_auth/registration/urls.py b/rest_auth/registration/urls.py index aead53c..8afadab 100644 --- a/rest_auth/registration/urls.py +++ b/rest_auth/registration/urls.py @@ -7,10 +7,20 @@ urlpatterns = patterns('', url(r'^$', Register.as_view(), name='rest_register'), url(r'^verify-email/$', VerifyEmail.as_view(), name='verify_email'), + # These two views are used in django-allauth and empty TemplateView were + # 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: + # djang-allauth https://github.com/pennersr/django-allauth/blob/master/allauth/account/views.py#L190 url(r'^account-email-verification-sent/$', TemplateView.as_view(), name='account_email_verification_sent'), url(r'^account-confirm-email/(?P\w+)/$', TemplateView.as_view(), name='account_confirm_email'), - ) diff --git a/rest_auth/test_urls.py b/rest_auth/test_urls.py index fb730a3..2a321cd 100644 --- a/rest_auth/test_urls.py +++ b/rest_auth/test_urls.py @@ -4,15 +4,15 @@ from django.contrib.auth.tests import urls from allauth.socialaccount.providers.facebook.views import FacebookOAuth2Adapter -from .urls import urlpatterns -from .registration.views import SocialLogin +from rest_auth.urls import urlpatterns +from rest_auth.registration.views import SocialLogin class FacebookLogin(SocialLogin): adapter_class = FacebookOAuth2Adapter urlpatterns += patterns('', - url(r'^rest-registration/', include('registration.urls')), + url(r'^rest-registration/', include('rest_auth.registration.urls')), url(r'^test-admin/', include(urls)), url(r'^account-email-verification-sent/$', TemplateView.as_view(), name='account_email_verification_sent'), diff --git a/rest_auth/runtests.py b/runtests.py similarity index 100% rename from rest_auth/runtests.py rename to runtests.py diff --git a/setup.py b/setup.py index 5227cbc..d96674d 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ setup( 'Django>=1.5.0', 'djangorestframework>=2.3.13', ], - test_suite='rest_auth.runtests.runtests', + test_suite='runtests.runtests', include_package_data=True, # cmdclass={}, classifiers=[ diff --git a/rest_auth/test_settings.py b/test_settings.py similarity index 100% rename from rest_auth/test_settings.py rename to test_settings.py