Re: Composite application configuration

2011-09-02 Thread jazg
Well I can do this: def main(global_config, **settings): settings.update((key, val) for key, val in global_config.items() if key not in settings) ...which means that this would work: [DEFAULT] x = 1 [app:app1] #inherits x x = my x #overrides x But if PasteDeploy already supports this w

Re: Routing requested based on presence of query params

2011-09-02 Thread Chris McDonough
On Fri, 2011-09-02 at 16:37 -0500, Michael Merickel wrote: > ``request_method`` is limited to comparison with a single query > parameter. To add more complex behavior you will need to use a custom > predicate. Actually request_method on the trunk accepts more than one, but request_param, yeah does

Re: Routing requested based on presence of query params

2011-09-02 Thread Michael Merickel
``request_method`` is limited to comparison with a single query parameter. To add more complex behavior you will need to use a custom predicate. Note that you are not required to use 2 routes here... After the pattern is matched for your route, there is view lookup performed based on the *view* pr

Re: Routing requested based on presence of query params

2011-09-02 Thread Jason
Could you write a custom route predicate (https://docs.pylonsproject.org/projects/pyramid/dev/narr/urldispatch.html#custom-route-predicates) that checks for your requirements? -- Jason -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To vie

Re: Virtual Hosting routes using composite application

2011-09-02 Thread Jason
I browsed the urlmap source code to find that this can be entered into the config file to use a subdomain for url mapping: [composite:main] use = egg:Paste#urlmap domain app1.localhost = app1pipe domain app2.localhost = app2pipe It's less than ideal because I would like to use a path to specif

Routing requested based on presence of query params

2011-09-02 Thread goya bean
Hello, to avoid 'None' checking and duplicate request returning code, I'm trying to use (or abuse) route requests in pyramid by using parameters in query Strings using the 'request_param=' argument as seen here: http://pastebin.com/G2shq75s is there a way to do what I'm trying to do using routing o

Virtual Hosting routes using composite application

2011-09-02 Thread Jason
HelIo, I've got a composite application using urlmap with two applications on different url prefixes. The documentation for virtual hosting at https://pylonsproject.org/projects/pyramid/dev/narr/vhosting.html doesn't say what I need to do to have my routes generate the correct URL. When I use

Pyramid 1.2a4 released

2011-09-02 Thread Chris McDonough
Pyramid 1.2a4 has been released. The changes from 1.2a3 are as follows: Features - Support an ``onerror`` keyword argument to ``pyramid.config.Configurator.scan()``. This onerror keyword argument is passed to ``venusian.Scanner.scan()`` to influence error behavior whe

Share a variable across modules - How do I replicate this Pylons Kungfu?

2011-09-02 Thread casibbald
Hi All, I have been playing with the pylons family of web products and love them, but I am working on a basic commandline toolset and would like some of the pylons magic without having a running service as the toolset will not be allowed to run as a webservice. So here is my problem, I have setup

Re: pylons-discuss and pylons-devel

2011-09-02 Thread Joe Dallago
O cool I've always wanted more details. On Thu, Sep 1, 2011 at 2:58 PM, Chris McDonough wrote: > My bad, I let this spam through. > > - C > > On Tue, 2011-08-30 at 10:14 -0700, bhuvanesh barani wrote: > > For more details: > > > > http://123maza.com/65/babul739/ > > > > > > -- >

Browse registered views

2011-09-02 Thread Dirk Makowski
Hi all, with its paster command "pviews" Pyramid offers a nice way to check the view callables that can be reached by a certain URL. Now, I'd like to go the other way round, that is list *all* registered views and display their attributes like name, permission etc. So I get not lost in details

Need to know how to implement the i18n

2011-09-02 Thread Geo
Reading through the i18n chapter of pyramid, I still can't figure out how can I actually use that feature. What I want to do is to have a "place" to change the locale globally, for now I'm trying to do in this way, in the page have a url which will be routed to the view like this: def change_to_c