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)

原文地址:https://www.cnblogs.com/lexus/p/1838104.html