[Patchew-devel] [PATCH] rest: Add Login in api

Shubham Jain shubhamjain7495 at gmail.com
Mon May 14 14:57:17 UTC 2018


Adding browsable login in api would help in checking the permission level of each endpoint for each user visually.
---
 patchew/urls.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/patchew/urls.py b/patchew/urls.py
index 08ace07..18cc95c 100644
--- a/patchew/urls.py
+++ b/patchew/urls.py
@@ -27,11 +27,13 @@ from django.conf.urls import include, url
 from api.admin import admin_site
 from django.conf.urls.static import static
 from django.conf import settings
+from rest_framework.authtoken import views
 
 urlpatterns = [
     url(r'^admin/', admin_site.urls),
     url(r'^api/', include('api.urls')),
     url(r'^', include('www.urls')),
+    url(r'^/api/api-auth/', include('rest_framework.urls',namespace='rest_framework')),
 ] + static(settings.STATIC_URL,
            document_root=settings.STATIC_ROOT) \
   + static(settings.MEDIA_URL,
-- 
2.14.3 (Apple Git-98)




More information about the Patchew-devel mailing list