|
@@ -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"'
|