Absolute path for static assets/ Get file modified time

2011-11-16 Thread Jay T
How do I get the absolute path for static assets ? The reason I need the absolute path is to determine the last modified time of a specific file so I can append it to my static resources like JS and CSS files. I wrote a Mako template def like this but it fails at : here =

Re: Absolute path for static assets/ Get file modified time

2011-11-16 Thread Jay T
' package, file = asset_path.split(':', 1) abs_path = pkg_resources.resource_filename(package, file) last_access_time = os.stat(abs_path)[8] On Wed, Nov 16, 2011 at 3:55 PM, Jay T jay.pyl...@gmail.com mailto:jay.pyl...@gmail.com wrote: How do I get the absolute path for static assets ? The reason

Modifying Beaker Session Timeout

2011-10-11 Thread Jay T
We are using pyramid_beaker module for handling sessions. The session factory gets set in the Configurator object during the app initialization. The session settings are defined in the .ini file. Is it possible to modify the session settings (session.timeout specifically) after the application

Re: Chaining of views using wrapper

2011-09-12 Thread Jay T
Here is the handler setup. config.add_handler('wrapper','/test_wrapper/{action}',handler=TestWrapper) config.add_handler('wrapped','/test_wrapper/{action}',handler=TestWrapper) Here is the handler code: class TestWrapper(BaseView):

Re: Chaining of views using wrapper

2011-09-12 Thread Jay T
I happened to read your blog : http://michael.merickel.org/2011/8/23/outgrowing-pyramid-handlers/ I think the match_param view predicate works great for what I really want to achieve. I can have one route with multiple views defined and have the request routed based on the match_param view

Chaining of views using wrapper

2011-09-11 Thread Jay T
Can someone please provide a simple example of view chaining using wrapper argument in View Config ? I am using pyramid_handlers for route/view declaration. I think I am missing something simple but shouldn't this work: @view_config(name='wrapped',wrapper='wrapper',renderer='string') def

LDAP Authentication

2011-07-21 Thread Jay T
We are starting to write a new application in Pyramid and having spent some time reading the documentation available on your website, I have some questions regarding Authentication: Pyramid offers few ways of performing Authentication (out of the box) and also provides the capability to write a