Update project template to make swagger working.

This commit is contained in:
Santiago L 2020-06-18 09:50:09 +02:00
parent 144344ebf9
commit 2f1d854a5e
2 changed files with 8 additions and 1 deletions

View File

@ -67,6 +67,7 @@ INSTALLED_APPS = [
'rest_framework.authtoken',
'passlib.ext.django',
'django_countries',
'rest_framework_swagger',
# 'debug_toolbar',
# Django.contrib
@ -228,7 +229,8 @@ REST_FRAMEWORK = {
'rest_framework.authentication.TokenAuthentication',
),
'DEFAULT_FILTER_BACKENDS': (
('rest_framework.filters.DjangoFilterBackend',)
# TODO(@slamora): commented to be able to run rest swagger
#('rest_framework.filters.DjangoFilterBackend',)
),
}

View File

@ -1,6 +1,11 @@
from django.conf.urls import include, url
from rest_framework_swagger.views import get_swagger_view
schema_view = get_swagger_view(title='Orchestra API')
urlpatterns = [
url(r'^swagger/$', schema_view),
url(r'', include('orchestra.urls')),
]