2014-10-08 14:19:15 +04:00
|
|
|
from django.conf.urls import patterns, url, include
|
|
|
|
from django.views.generic import TemplateView
|
2015-04-17 10:53:46 +03:00
|
|
|
import rest_auth.django_test_urls
|
2014-10-08 14:19:15 +04:00
|
|
|
|
|
|
|
from allauth.socialaccount.providers.facebook.views import FacebookOAuth2Adapter
|
|
|
|
|
2014-10-14 16:56:00 +04:00
|
|
|
from rest_auth.urls import urlpatterns
|
2015-08-07 13:54:45 +03:00
|
|
|
from rest_auth.registration.views import SocialLoginView
|
2014-10-08 14:19:15 +04:00
|
|
|
|
|
|
|
|
2015-08-07 13:54:45 +03:00
|
|
|
class FacebookLogin(SocialLoginView):
|
2014-10-08 14:19:15 +04:00
|
|
|
adapter_class = FacebookOAuth2Adapter
|
|
|
|
|
2015-04-28 11:04:20 +03:00
|
|
|
urlpatterns += patterns(
|
|
|
|
'',
|
2014-10-14 16:56:00 +04:00
|
|
|
url(r'^rest-registration/', include('rest_auth.registration.urls')),
|
2015-04-17 10:53:46 +03:00
|
|
|
url(r'^test-admin/', include(rest_auth.django_test_urls)),
|
2014-10-08 14:19:15 +04:00
|
|
|
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'),
|
2015-02-27 15:56:29 +03:00
|
|
|
url(r'^social-login/facebook/$', FacebookLogin.as_view(), name='fb_login'),
|
|
|
|
url(r'^accounts/', include('allauth.socialaccount.urls'))
|
2014-10-08 14:19:15 +04:00
|
|
|
)
|