def submit_file(self, rdata, files, user): form = FileForm(rdata, files) if form.is_valid(): form.send() return Msg(form.cleaned_data['file'].size) else: return Error(form.get_errors())
def submit(self, rdata, user): form = FeedbackForm(rdata) if form.is_valid(): form.send() return Msg('Thank you for feedback.') else: return Error(form.get_errors())
def hello(self, username, user): return Msg(u'Hello, %s!' % username)
def log_something(self, msg, user): print(msg) return Msg('OK')
def func1(self, val, d='default', *args, **kwargs): print('val =', val) print('d =', d) print('args =', args) print('kwargs =', kwargs) return Msg('func1')
def func1(self, user, request): return Msg(u'func1')
def func5(self, user, request): return Msg(u'func5')
def func4(self, user, request): return Msg(u'func4')
def func3(self, user, request): return Msg(u'func3')
def func2(self, val, **kwargs): return Msg(u'func2')
def func1(self, val, d='default', *args, **kwargs): print 'val =', val print 'd =', d print 'args =', args print 'kwargs =', kwargs return Msg(u'func1')