mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-11-29 04:23:42 +03:00
move some test files outside app
This commit is contained in:
parent
de10f2c75a
commit
102fcedc82
|
@ -7,10 +7,20 @@ urlpatterns = patterns('',
|
||||||
url(r'^$', Register.as_view(), name='rest_register'),
|
url(r'^$', Register.as_view(), name='rest_register'),
|
||||||
url(r'^verify-email/$', VerifyEmail.as_view(), name='verify_email'),
|
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(),
|
url(r'^account-email-verification-sent/$', TemplateView.as_view(),
|
||||||
name='account_email_verification_sent'),
|
name='account_email_verification_sent'),
|
||||||
url(r'^account-confirm-email/(?P<key>\w+)/$', TemplateView.as_view(),
|
url(r'^account-confirm-email/(?P<key>\w+)/$', TemplateView.as_view(),
|
||||||
name='account_confirm_email'),
|
name='account_confirm_email'),
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -4,15 +4,15 @@ from django.contrib.auth.tests import urls
|
||||||
|
|
||||||
from allauth.socialaccount.providers.facebook.views import FacebookOAuth2Adapter
|
from allauth.socialaccount.providers.facebook.views import FacebookOAuth2Adapter
|
||||||
|
|
||||||
from .urls import urlpatterns
|
from rest_auth.urls import urlpatterns
|
||||||
from .registration.views import SocialLogin
|
from rest_auth.registration.views import SocialLogin
|
||||||
|
|
||||||
|
|
||||||
class FacebookLogin(SocialLogin):
|
class FacebookLogin(SocialLogin):
|
||||||
adapter_class = FacebookOAuth2Adapter
|
adapter_class = FacebookOAuth2Adapter
|
||||||
|
|
||||||
urlpatterns += patterns('',
|
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'^test-admin/', include(urls)),
|
||||||
url(r'^account-email-verification-sent/$', TemplateView.as_view(),
|
url(r'^account-email-verification-sent/$', TemplateView.as_view(),
|
||||||
name='account_email_verification_sent'),
|
name='account_email_verification_sent'),
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -31,7 +31,7 @@ setup(
|
||||||
'Django>=1.5.0',
|
'Django>=1.5.0',
|
||||||
'djangorestframework>=2.3.13',
|
'djangorestframework>=2.3.13',
|
||||||
],
|
],
|
||||||
test_suite='rest_auth.runtests.runtests',
|
test_suite='runtests.runtests',
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
# cmdclass={},
|
# cmdclass={},
|
||||||
classifiers=[
|
classifiers=[
|
||||||
|
|
Loading…
Reference in New Issue
Block a user