-
Notifications
You must be signed in to change notification settings - Fork 0
/
tranedit.py
38 lines (27 loc) · 960 Bytes
/
tranedit.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# -*- coding: utf-8 -*-
'''
#=============================================================================
# FileName: tranedit.py
# Desc:
# Author: solomon
# Email: [email protected]
# HomePage:
# Version: 0.0.1
# LastChange: 2012-10-28 18:29:10
# History:
#=============================================================================
'''
from django.template.loader import get_template
from django.template import Context
from django.http import HttpResponse
import confsql,datetime,memcache
from django.utils import simplejson
import functions
from mylog import log
def tranedit(request):
myValue = request.POST["value"].encode("utf-8")
myValuelist = functions.fmwConvertList(myValue, '\n')
myValuelist2 = [ functions.fmwConvertList(x, '\t') for x in myValuelist]
myValuelist2.pop(0) #标题
myNewValue = functions.fmw2Htmltable(myValuelist2)
return HttpResponse(myNewValue)