Adding swagger
This commit is contained in:
@@ -62,6 +62,7 @@ urlpatterns = [
|
|||||||
# url(r'^password_change/$',auth_views.password_change),
|
# url(r'^password_change/$',auth_views.password_change),
|
||||||
# url(r'^password_change_done/$',auth_views.password_change_done),
|
# url(r'^password_change_done/$',auth_views.password_change_done),
|
||||||
url(r'^', include(router.urls)),
|
url(r'^', include(router.urls)),
|
||||||
|
url(r'^api-docs$', views.schema_view),
|
||||||
url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
|
url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
|
||||||
url(r'^testbokeh$',views.testbokeh),
|
url(r'^testbokeh$',views.testbokeh),
|
||||||
url(r'^500/$', TemplateView.as_view(template_name='500.html'),name='500'),
|
url(r'^500/$', TemplateView.as_view(template_name='500.html'),name='500'),
|
||||||
|
|||||||
@@ -61,6 +61,8 @@ queue = django_rq.get_queue('default')
|
|||||||
queuelow = django_rq.get_queue('low')
|
queuelow = django_rq.get_queue('low')
|
||||||
queuehigh = django_rq.get_queue('low')
|
queuehigh = django_rq.get_queue('low')
|
||||||
|
|
||||||
|
from rest_framework_swagger.views import get_swagger_view
|
||||||
|
|
||||||
import plots
|
import plots
|
||||||
import mailprocessing
|
import mailprocessing
|
||||||
|
|
||||||
@@ -74,6 +76,8 @@ USER_LANGUAGE = 'en-US'
|
|||||||
|
|
||||||
from interactiveplots import *
|
from interactiveplots import *
|
||||||
|
|
||||||
|
schema_view = get_swagger_view(title='Rowsandall API')
|
||||||
|
|
||||||
def error500_view(request):
|
def error500_view(request):
|
||||||
response = render_to_response('500.html', {},
|
response = render_to_response('500.html', {},
|
||||||
context_instance = RequestContext(request))
|
context_instance = RequestContext(request))
|
||||||
|
|||||||
@@ -48,8 +48,7 @@ INSTALLED_APPS = [
|
|||||||
'debug_toolbar',
|
'debug_toolbar',
|
||||||
'django_mailbox',
|
'django_mailbox',
|
||||||
'rest_framework',
|
'rest_framework',
|
||||||
'provider',
|
'rest_framework_swagger',
|
||||||
'provider.oauth2',
|
|
||||||
]
|
]
|
||||||
|
|
||||||
MIDDLEWARE_CLASSES = [
|
MIDDLEWARE_CLASSES = [
|
||||||
@@ -244,6 +243,6 @@ REST_FRAMEWORK = {
|
|||||||
'DEFAULT_AUTHENTICATION_CLASSES': (
|
'DEFAULT_AUTHENTICATION_CLASSES': (
|
||||||
'rest_framework.authentication.BasicAuthentication',
|
'rest_framework.authentication.BasicAuthentication',
|
||||||
'rest_framework.authentication.SessionAuthentication',
|
'rest_framework.authentication.SessionAuthentication',
|
||||||
'rest_framework.authentication.OAuth2Authentication',
|
# 'rest_framework.authentication.OAuth2Authentication',
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user