소스 검색

HUE-8888 [core] Update link to Django session documentation

Romain 6 년 전
부모
커밋
19c02387b5
3개의 변경된 파일9개의 추가작업 그리고 7개의 파일을 삭제
  1. 2 2
      desktop/conf.dist/hue.ini
  2. 2 2
      desktop/conf/pseudo-distributed.ini.tmpl
  3. 5 3
      desktop/core/src/desktop/settings.py

+ 2 - 2
desktop/conf.dist/hue.ini

@@ -616,7 +616,7 @@
       # client_secret=
 
   # Configuration options for specifying the Desktop Database. For more info,
-  # see http://docs.djangoproject.com/en/1.4/ref/settings/#database-engine
+  # see http://docs.djangoproject.com/en/1.11/ref/settings/#database-engine
   # ------------------------------------------------------------------------
   [[database]]
     # Database engine is typically one of:
@@ -632,7 +632,7 @@
     ## user=
     ## password=
     # conn_max_age option to make database connection persistent value in seconds
-    # https://docs.djangoproject.com/en/1.9/ref/databases/#persistent-connections
+    # https://docs.djangoproject.com/en/1.11/ref/databases/#persistent-connections
     ## conn_max_age=0
     # Execute this script to produce the database password. This will be used when 'password' is not set.
     ## password_script=/path/script

+ 2 - 2
desktop/conf/pseudo-distributed.ini.tmpl

@@ -620,7 +620,7 @@
       # client_secret=
 
   # Configuration options for specifying the Desktop Database. For more info,
-  # see http://docs.djangoproject.com/en/1.4/ref/settings/#database-engine
+  # see http://docs.djangoproject.com/en/1.11/ref/settings/#database-engine
   # ------------------------------------------------------------------------
   [[database]]
     # Database engine is typically one of:
@@ -644,7 +644,7 @@
     ## options={}
 
   # Configuration options for specifying the Desktop session.
-  # For more info, see https://docs.djangoproject.com/en/1.4/topics/http/sessions/
+  # For more info, see https://docs.djangoproject.com/en/1.11/topics/http/sessions/
   # ------------------------------------------------------------------------
   [[session]]
     # The name of the cookie to use for sessions.

+ 5 - 3
desktop/core/src/desktop/settings.py

@@ -353,9 +353,11 @@ EMAIL_SUBJECT_PREFIX = 'Hue %s - ' % desktop.conf.CLUSTER_ID.get()
 if os.getenv('DESKTOP_DB_CONFIG'):
   conn_string = os.getenv('DESKTOP_DB_CONFIG')
   logging.debug("DESKTOP_DB_CONFIG SET: %s" % (conn_string))
-  default_db = dict(list(zip(
-    ["ENGINE", "NAME", "TEST_NAME", "USER", "PASSWORD", "HOST", "PORT"],
-    conn_string.split(':'))))
+  default_db = dict(
+    list(
+      zip(["ENGINE", "NAME", "TEST_NAME", "USER", "PASSWORD", "HOST", "PORT"], conn_string.split(':'))
+    )
+  )
   default_db['NAME'] = default_db['NAME'].replace('#', ':') # For is_db_alive command
 else:
   test_name = os.environ.get('DESKTOP_DB_TEST_NAME', get_desktop_root('desktop-test.db'))