summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lcm/lcm/settings.py20
-rw-r--r--lcm/requirements.txt5
2 files changed, 24 insertions, 1 deletions
diff --git a/lcm/lcm/settings.py b/lcm/lcm/settings.py
index f4b7826b..988740ea 100644
--- a/lcm/lcm/settings.py
+++ b/lcm/lcm/settings.py
@@ -45,7 +45,8 @@ INSTALLED_APPS = [
'rest_framework',
'lcm.pub.database',
'lcm.samples',
- 'lcm.swagger'
+ 'lcm.swagger',
+ 'drf_yasg',
]
MIDDLEWARE_CLASSES = [
@@ -76,6 +77,23 @@ REST_FRAMEWORK = {
)
}
+# drf-yasg
+TEMPLATES = [
+ {
+ 'BACKEND': 'django.template.backends.django.DjangoTemplates',
+ 'DIRS': [],
+ 'APP_DIRS': True,
+ 'OPTIONS': {
+ 'context_processors': [
+ 'django.template.context_processors.debug',
+ 'django.template.context_processors.request',
+ 'django.contrib.auth.context_processors.auth',
+ 'django.contrib.messages.context_processors.messages',
+ ],
+ },
+ },
+]
+
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
diff --git a/lcm/requirements.txt b/lcm/requirements.txt
index 740d0fe6..07ea5669 100644
--- a/lcm/requirements.txt
+++ b/lcm/requirements.txt
@@ -19,3 +19,8 @@ httplib2==0.9.2
coverage==4.2
mock==2.0.0
unittest_xml_reporting==1.12.0
+
+# for auto-swagger
+drf-yasg>=1.2.2
+flex>=6.11.1
+swagger-spec-validator>=2.1.0 \ No newline at end of file