[pylons-discuss] get_current_request() for debug output / logging?

2014-07-20 Thread Achim Domma
Hi, the documentation is quite clear about the Don't do that!!! regarding usage of get_current_request(). But however I approach my problem, I end up with get_current_request being the best solution, so I thought I should ask for permission. ;-) Here is my scenario: I have some service

[pylons-discuss] How set X-Accel-Expires in add_view, add_static_view

2014-07-20 Thread Grigorii Eremeev
Hello I want use cache nginx and cache browser. For managing cache nginx i use X-Accel-Expires. For managing cache browser i use Cache-Control. Cache-Control is simple, need set parameters http_cache in add_view and cache_max_age in add_static_view. But how set X-Accel-Expires in same

[pylons-discuss] beginner: route_url param

2014-07-20 Thread Michael
hi all, how do I properly create a param with route_url ? when I do *return HTTPFound(location=request.route_url('user_recent', username=auth.username, page='1'), headers=headers) * /Users/Shared/webapp/lrd_env/lrd/lrd/views/articles.py(67)recent() - with ReqAuthorize(request): (Pdb) p

Re: [pylons-discuss] beginner: route_url param

2014-07-20 Thread Wichert Akkerman
On 20 Jul 2014, at 21:15, Michael taomaili...@gmail.com wrote: hi all, how do I properly create a param with route_url ? when I do return HTTPFound(location=request.route_url('user_recent', username=auth.username, page='1'), headers=headers) Use the _query parameter for route_url:

Re: [pylons-discuss] beginner: route_url param

2014-07-20 Thread Michael
This works, thanks. FYI I need the username to stay in the matchdict, so my final line looks like: return HTTPFound(location=request.route_url('user_recent', username=auth.username, _query={'page':'1'}), headers=headers) On Sunday, July 20, 2014 3:31:48 PM UTC-4, Wichert Akkerman