잉여개발기 vor 2 Jahren
Ursprung
Commit
7f56d0685b
3 geänderte Dateien mit 6 neuen und 3 gelöschten Zeilen
  1. 1 1
      route/main_setting_main.py
  2. 3 2
      route/tool/func.py
  3. 2 0
      route/view_read.py

+ 1 - 1
route/main_setting_main.py

@@ -23,7 +23,7 @@ def main_setting_main(db_set):
             19 : ['slow_edit', ''],
             20 : ['requires_approval', ''],
             21 : ['backup_where', ''],
-            22 : ['domain', flask.request.host],
+            22 : ['domain', load_domain()],
             23 : ['ua_get', ''],
             24 : ['enable_comment', ''],
             25 : ['enable_challenge', ''],

+ 3 - 2
route/tool/func.py

@@ -814,6 +814,7 @@ def load_domain(data_type = 'normal'):
         curs = conn.cursor()
         
         domain = ''
+        sys_host = flask.request.host
         
         if data_type == 'full':
             curs.execute(db_change("select data from other where name = 'http_select'"))
@@ -823,11 +824,11 @@ def load_domain(data_type = 'normal'):
 
             curs.execute(db_change("select data from other where name = 'domain'"))
             db_data = curs.fetchall()
-            domain += db_data[0][0] if db_data and db_data[0][0] != '' else flask.request.host
+            domain += db_data[0][0] if db_data and db_data[0][0] != '' else sys_host
         else:
             curs.execute(db_change("select data from other where name = 'domain'"))
             db_data = curs.fetchall()
-            domain += db_data[0][0] if db_data and db_data[0][0] != '' else flask.request.host
+            domain += db_data[0][0] if db_data and db_data[0][0] != '' else sys_host
 
         return domain
 

+ 2 - 0
route/view_read.py

@@ -248,6 +248,8 @@ def view_read(name = 'Test', doc_rev = '', doc_from = '', do_type = ''):
             else:
                 flask.session['lastest_document'] += [name]
 
+            print(flask.session['lastest_document'])
+
             if uppage != 0:
                 menu += [['w/' + url_pas(uppage), load_lang('upper')]]