On Tue, Dec 7, 2010 at 2:25 PM, Joel <[email protected]> wrote: >> it's defaulting to disabled now. Check the Routes line in >> middleware.py and try this: >> >> app = RoutesMiddleware(app, config['routes.map'], singleton=True) >> >> (Keep any other arguments if there are any.) > > I tried adding the singleton argument, but I get: > > File "/Users/user/app/app/config/middleware.py", line 44, in make_app > app = RoutesMiddleware(app, config['routes.map'], singleton=True) > TypeError: __init__() got an unexpected keyword argument 'singleton'
That must be an old version of Routes. > python setup.py develop > > This installs Pylons-1.0 and WebHelpers-1.2 but gives me the following > error: > > Installed /Users/user/env-2.6-1.0/lib/python2.6/site-packages/ > Pylons-1.0-py2.6.egg > Reading http://www.pylonshq.com/download/1.0 > error: Installed distribution WebHelpers 1.2 conflicts with > requirement WebHelpers>=0.6.1,<0.6.99 > > So, again I find that something is requiring WebHelpers>=0.6.1,<0.6.99 > and I can't figure out what. That's one of the ^%*&&$ problems with Setuptools, it doesn't tell you which package is asking for that version. Well, look in the setup-py or egg-info for Pylons, and then try "grep 'WebHelpers[<=>]' THE_VIRTUALENV/lib/python2.6/site-packages" and see if it comes up with anything. It must be something very old if it mentions 0.6.1, because that was released 7/2008 and 0.6.4 was released 12/2008. Also check your global site-packages or dist-packages or OS packages. There may be a ``pkg_resources`` function that will reveal which package is asking for that version. http://packages.python.org/distribute/pkg_resources.html Your application may need other changes to work on Pylons 1, so stick with 0.9.7 if that's what it's been running on, unless you want to upgrade it now. > But this results in the same GenerationException (even when I add the > singleton=True argument to > app = RoutesMiddleware(app, config['routes.map']) in app/app/config/ > middleware.py.) Well, if the same problem occurs with singleton=True or singleton=False, or with an older version of Routes that doesn't have the 'singleton' arg, the problem must be something else. In the action that invokes the template, see if you can do a ``log.debug(url_for(page=2))``. You can also just copy the latest paginate module into your application so that you won't need WebHelpers 1.2 installed. -- Mike Orr <[email protected]> -- 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.
