summaryrefslogtreecommitdiffstats
path: root/lcm
diff options
context:
space:
mode:
authorying.yunlong <ying.yunlong@zte.com.cn>2018-01-25 09:54:02 +0800
committerying.yunlong <ying.yunlong@zte.com.cn>2018-01-25 09:54:02 +0800
commitadeb7c0268162c5dac043c5096c00bfd2f0c12f7 (patch)
treeb9ce946f90d10f0cea9796db9ec5506c5fec53d7 /lcm
parent1b8806ad85016e93a6d049730a54e56a518656a0 (diff)
Add vfc-vnflcm auto-swagger requirements
Change-Id: Id1c4b3266cc692b229df2a94cc92e603d5eb1d40 Issue-ID: VFC-682 Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
Diffstat (limited to 'lcm')
-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