Exemplo n.º 1
0
    def __init__(self, first_arg=None, form=None, **kwargs):
        if first_arg:
            raise Exception('To create a model, please use kwargs.')

        self.is_validate = False
        self.errors = {}
        self.form = form
        self.user = mwoauth.getUser()
        self.doinit(**kwargs)
Exemplo n.º 2
0
 def callee(*args, **kwargs):
     user = mwoauth.getUser()
     if not user.in_group(groups):
         return render('errors/permission.html', groups=groups)
     else:
         return fn(*args, **kwargs)