Add vfc-vnflcm auto-swagger requirements 83/29083/1
authorying.yunlong <ying.yunlong@zte.com.cn>
Thu, 25 Jan 2018 01:54:02 +0000 (09:54 +0800)
committerying.yunlong <ying.yunlong@zte.com.cn>
Thu, 25 Jan 2018 01:54:02 +0000 (09:54 +0800)
Change-Id: Id1c4b3266cc692b229df2a94cc92e603d5eb1d40
Issue-ID: VFC-682
Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
lcm/lcm/settings.py
lcm/requirements.txt

index f4b7826..988740e 100644 (file)
@@ -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',
index 740d0fe..07ea566 100644 (file)
@@ -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