Actually params are not passed to functions so you need to do: matchdict = self.request.matchdict login = db.load_form(matchdict['id']
On Oct 2, 3:08 am, Madhu Alagu <alma...@gmail.com> wrote: > Hi, > > __init__.py > > def main(global_config, **settings): > """ This function returns a Pylons WSGI application. > """ > from pylons.configuration import Configurator > config = Configurator(settings=settings) > config.begin() > config.add_cache() > config.add_sessions() > config.add_static_view('static', 'ebro:static/') > config.add_handler('action', '/{action}', > 'ebro.handlers:MyHandler') > config.add_handler('action', '/{action}/{id}', > 'ebro.handlers:MyHandler') > config.add_handler('home', '/', > 'ebro.handlers:MyHandler',action='login') > config.add_handler('css', '/forms', > 'ebro.handlers:MyHandler',action='forms') > config.end() > return config.make_wsgi_app() > > handlers.py > > from pylons.views import action > from ebro.db import DBSession as db > from ebro.sf import SFSession as sf > from pylons.controllers.util import Response > > class MyHandler(object): > def __init__(self, request): > self.request = request > > def forms(self,id): > login = db.load_form(id) > response = Response(login) > response.content_type = 'application/vnd.mozilla.xul+xml' > return response > > I try to called /forms/menus,/forms/sales .... > > WebError Traceback: > ⇝ TypeError: forms() takes exactly 2 arguments (1 given) > > Thanks > > Madhu Alagu -- You received this message because you are subscribed to the Google Groups "pylons-devel" group. To post to this group, send email to pylons-de...@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.