You could say pyramid.threadlocal.get_current_registry().settings
http://docs.pylonsproject.org/projects/pyramid/dev/api/threadlocal.html#pyramid.threadlocal.get_current_registry
Whether you /should/ is up to you.
Daniel
--
You received this message because you are subscribed to the Google Gro
hi Ryan
Maybe, you want that
pyramid.threadlocal.get_current_registry().setting
2011/02/02 10:34 "Ryan McKillen" :
> I should have specified that I'm using Pyramid.
>
>
> On Tue, Feb 1, 2011 at 5:03 PM, Wyatt Baldwin
> wrote:
>
>> On Tuesday, February 1, 2011 4:03:13 PM UTC-8, Ryan wrote:
>>>
>>>
I should have specified that I'm using Pyramid.
On Tue, Feb 1, 2011 at 5:03 PM, Wyatt Baldwin
wrote:
> On Tuesday, February 1, 2011 4:03:13 PM UTC-8, Ryan wrote:
>>
>> I'm aware that request.environ['paste.config'] will return configuration
>> settings from whichever .ini is being utilized, in a
On Tuesday, February 1, 2011 4:03:13 PM UTC-8, Ryan wrote:
>
> I'm aware that request.environ['paste.config'] will return configuration
> settings from whichever .ini is being utilized, in a view. How can I access
> the Paster configuration from a model or test script?
I would recommend that yo
FTR, in Pyramid, this would be spelled something like:
def mobile_user_agent(info, request):
if request.user_agent in ['list', 'of', 'mobile', 'agents']:
return True
return False
And then you would associate that predicate with views, ala:
@view_config(custom_predicates=(mobile_u
On Thu, Jan 27, 2011 at 1:58 PM, Brian O'Connor wrote:
> What's the current best practice for serving mobile templates? The ideal
> situation for me _right now_ would be if I detect a user on a mobile client
> (either by url or USER_AGENT detection), the render() function would first
> look in a
I'm aware that request.environ['paste.config'] will return configuration
settings from whichever .ini is being utilized, in a view. How can I access
the Paster configuration from a model or test script?
--
You received this message because you are subscribed to the Google Groups
"pylons-discus
Hi Wyatt,
I actually wanted to modify the url function itself since I had a lot
of url() calls all over my code. But I opted to modify each one
instead. Thanks for the help.
On Jan 31, 7:57 pm, Wyatt Baldwin wrote:
> You could add a `url` function to your helpers module that wraps
> `pylons.url
I've been trying to build a distribution egg and when I do it includes
everything on my app directory. I have a media folder which contains
images that belong to db records and I would like to exclude that
directory. I have tried to do this by including this line in the
manifest.ini file
exclude a
I do have my own WSGI transaction manager. It is 44 lines long. It operates
at the WSGI layer so it puts the per-request session in the WSGI environ. It
probably issues COMMIT more often than necessary.
It exists to avoid an external dependency in case you would rather use a
different transacti
s = Session.object_session(self) without model code should work with the
caveat that it won't if the object isn't part of a session yet.
Also wanted to point out DanielHolth's implementation of this inside of
stucco_auth. He stores the session in the environ, sharing it with a custom
transaction m
On Mon, 2011-01-31 at 21:12 -0800, Michael Merickel wrote:
> I wanted to expand on the pyramid_cookbook entry (https://github.com/
> Pylons/pyramid_cookbook/blob/master/sqla.rst) for using sqlalchemy
> without the scoped_session.
>
> So I created a gist that demonstrates more in-depth how it can b
12 matches
Mail list logo