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 =
'
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
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
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):
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
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
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