Pyramid中简化你的代码

Mon 14 August 2017

简化并修改view_config装饰器

因为Pyramid自带的view_config装饰器非常复杂,需要配置的参数比较多,修改一下装饰器,每次可以少写一点代码……

def get_with_permission(**settings):
    # delete debug tag TODO
    view_configer = view_config(decorator=permission_require(login_url=LOGIN_URL), **settings …

Category: 技术流水账

comments

Read More
Page 2 of 2

« Prev