On Mon, Jan 2, 2012 at 5:11 AM, uday <gotou...@gmail.com> wrote: > from sample.models import DBSession > from sample.models import MyModel > from pyramid.response import Response > from pyramid.view import view_config > > def decorator(view,params): > def wrapper(request,params): > #doing something with params > return view(request) > return wrapper > > @view_config(route_name="index") > @decorator(params='params') > def index(request): > return Response("index") > > def includeme(config): > config.add_route("index","/index") > > I just want to pass some params to a decorator for a view callable, > but the above code is failing, What is wrong with it? > You're not calling it with the required positional args that you define in the function signature.
Chris -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.