Exemplo n.º 1
0
 def __init__(self, **kwargs):
     self.children = []
     self.attrs = []
     self.tag = getparam(kwargs, 'tag', None, True)
     self.single_line = getparam(kwargs, 'single_line', False, True)
     self.close_tag = getparam(kwargs, 'close_tag', True, True)
     for key, value in kwargs.items():
         self.attr(HtmlAttribute(key, value))
Exemplo n.º 2
0
def addcatagory():
    catagory=Catagory()
    requeststr = request.query_string
    print unquote(requeststr)
    params=utils.getparam(unquote(requeststr))
    catagory.catagoryname=params['catagoryname']
    catagory.belongto=params['belongto']
    catagory.addcatagory()
    return jsonify(msg='0000')
Exemplo n.º 3
0
def editcatagory():
	catagory=Catagory()
	requeststr=request.query_string
	params=utils.getparam(unquote(requeststr))
	paramdict={}
	paramdict["catagoryid"]=params['catagoryid']
	paramdict["catagoryname"]=params['catagoryname']
	paramdict["belongto"]=params['belongto']
	catagory.updatecatagory(paramdict)
	return jsonify(msg='0000')
Exemplo n.º 4
0
def adduser():
    user=User()
    requeststr = request.query_string
    params=utils.getparam(unquote(requeststr))
    user.username=params['username']
    user.email=params['email']
    user.password=params['password']
    user.sex=params['sex']
    user.adduser()
    return jsonify(msg='0000')
Exemplo n.º 5
0
def edituser():
	user=User()
	requeststr=request.query_string
	params=utils.getparam(unquote(requeststr))
	paramdict={}
	paramdict["userid"]=params['userid']
	paramdict["username"]=params['username']
	paramdict["email"]=params['email']
	paramdict["password"]=params['password']
	paramdict["sex"]=params['sex']
	user.updateuser(paramdict)
	return jsonify(msg='0000')
Exemplo n.º 6
0
def login():
    requeststr = request.query_string
    params=utils.getparam(requeststr)
    username=params['username']
    return render_template("index.html",title = 'Home',action='/login')
Exemplo n.º 7
0
 def __init__(self, **kwargs):
     styles = getparam(kwargs, 'styles', None, True)
     super().__init__(tag='style', **kwargs)
     if styles is not None:
         for line in styles:
             self.child(line)