2014-10-08 14:19:15 +04:00
|
|
|
from django.conf.urls import patterns, url, include
|
|
|
|
from django.views.generic import TemplateView
|
|
|
|
from django.contrib.auth.tests import urls
|
|
|
|
|
|
|
|
from allauth.socialaccount.providers.facebook.views import FacebookOAuth2Adapter
|
|
|
|
|
2014-10-14 16:56:00 +04:00
|
|
|
from rest_auth.urls import urlpatterns
|
|
|
|
from rest_auth.registration.views import SocialLogin
|
2014-10-08 14:19:15 +04:00
|
|
|
|
|
|
|
|
|
|
|
class FacebookLogin(SocialLogin):
|
|
|
|
adapter_class = FacebookOAuth2Adapter
|
|
|
|
|
|
|
|
urlpatterns += patterns('',
|
2014-10-14 16:56:00 +04:00
|
|
|
url(r'^rest-registration/', include('rest_auth.registration.urls')),
|
2014-10-08 14:19:15 +04:00
|
|
|
url(r'^test-admin/', include(urls)),
|
|
|
|
url(r'^account-email-verification-sent/$', TemplateView.as_view(),
|
|
|
|
name='account_email_verification_sent'),
|
|
|
|
url(r'^account-confirm-email/(?P<key>\w+)/$', TemplateView.as_view(),
|
|
|
|
name='account_confirm_email'),
|
|
|
|
url(r'^social-login/facebook/$', FacebookLogin.as_view(), name='fb_login')
|
|
|
|
)
|