Browse Source

新增中文“”转化为_

WuYiPei 5 years ago
parent
commit
9e16ec4e3a
2 changed files with 3 additions and 2 deletions
  1. 2 2
      controller/LangArea.py
  2. 1 0
      web/js/jqhttpsdk.js

+ 2 - 2
controller/LangArea.py

@@ -113,6 +113,7 @@ class LangAreaView(TemplateView):
         return response.json(0, list(la_qs))
 
     def do_export(self, request_dict, response, userID):
+        print("进来了")
         id = request_dict.get('id', None)
         type = request_dict.get('type', None)
         # key_list = LangKeyModel.objects.filter().values_list('word_key', flat=True)
@@ -148,7 +149,7 @@ class LangAreaView(TemplateView):
                 lk = l
                 lk = lk.replace('.', '_')
                 lk = lk.replace('\\n', '_')
-
+                lk = lk.replace('“”', '_')
                 lk = lk.replace(' ', '_')
                 lk = lk.replace('\\\'', '_')
                 lk = lk.replace('\'', '_')
@@ -193,7 +194,6 @@ class exportLangView(TemplateView):
 
     def validate(self, request_dict):
         # 得到即将下载文件的路径和名称
-
         response = StreamingHttpResponse('123l4kjlkfjlksadjlfksdajlf')
         response['Content-Type'] = 'application/octet-stream'
         response['Content-Disposition'] = 'attachment;filename="lang.txt"'

+ 1 - 0
web/js/jqhttpsdk.js

@@ -13,6 +13,7 @@ var http_ip_prot = convertTemp()+ "/";
 	if( http_ip_prot.indexOf("zositech")==-1){
 		http_ip_prot="http://192.168.136.39:8000/";
     	http_ip_prot = 'http://47.107.129.126:7724/';
+    	// http_ip_prot = 'http://127.0.0.1:8000/'
     	// http_ip_prot = 'http://192.168.136.40:7724/';
     	// let http_ip_prot = 'http://192.168.136.40:7724/';
 		console.log(http_ip_prot);