moves on api
[wolnelektury.git] / src / api / urls.py
index 2c4c792..b0ee94d 100644 (file)
@@ -9,10 +9,19 @@ from stats.utils import piwik_track_view
 from . import views
 
 
+urlpatterns1 = [
+    path('login/', csrf_exempt(views.LoginView.as_view())),
+    path('', include('catalogue.api.urls2')),
+]
+
+
 urlpatterns = [
+    path('2/', include((urlpatterns1, 'api'), namespace="v2")),
+
     path('oauth/request_token/', csrf_exempt(views.OAuth1RequestTokenView.as_view())),
     path('oauth/authorize/', views.oauth_user_auth, name='oauth_user_auth'),
     path('oauth/access_token/', csrf_exempt(views.OAuth1AccessTokenView.as_view())),
+    path('login/', csrf_exempt(views.LoginView.as_view())),
 
     path('', TemplateView.as_view(template_name='api/main.html'), name='api'),
 
@@ -34,7 +43,7 @@ urlpatterns = [
     path('blog',
          piwik_track_view(views.BlogView.as_view())),
 
-    path('pictures/', include('picture.api.urls')),
     path('', include('social.api.urls')),
     path('', include('catalogue.api.urls')),
+
 ]