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 received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.