post2locals

def post2locals(dict=locals(),func=None):
    for k,v in request.POST.iterallitems():
        dict["_"+k]=v
        if func is not None and callable(func):
            dict["_"+k]=func(v)

你可能感兴趣的:(local)