From 6f1ac221802a970452426b801e460680d7b9b81c Mon Sep 17 00:00:00 2001 From: Nagkumar Date: 2016年2月27日 18:59:49 -0800 Subject: [PATCH] Added the login required mixin to the view so that logged in users can view the docs. --- rest_framework_docs/urls.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rest_framework_docs/urls.py b/rest_framework_docs/urls.py index beb1588..a261e8d 100644 --- a/rest_framework_docs/urls.py +++ b/rest_framework_docs/urls.py @@ -1,7 +1,8 @@ from django.conf.urls import url from rest_framework_docs.views import DRFDocsView +from django.contrib.auth.decorators import login_required urlpatterns = [ # Url to view the API Docs - url(r'^$', DRFDocsView.as_view(), name='drfdocs'), + url(r'^$', login_required(DRFDocsView.as_view()), name='drfdocs'), ]

AltStyle によって変換されたページ (->オリジナル) /