defnull/bottle — Issue #248: validate() decorator cannot work with sqlite.plugin
Author: andycjw
Created: 2011-11-07 09:36:27+00:00
State: open

the @validate decorator will not work if used together with sqlite plugin since it requires the use of non-keyword argument
using the web todo list tutorial from official website as example

...
@route('/edit/:no', method='GET', apply=sqlite.Plugin(dbfile='todo.db'))
@validate(no=int)
def edit_item(db, no):
...

calling the url @ /edit/2 will return http error 500
TypeError('edit_item() takes exactly 2 non-keyword arguments (0 given)',)