Re: WSGI Fails ImportError: No module named deploy

2008-06-16 Thread Wichert Akkerman
Previously Mike Orr wrote: On Sun, Jun 15, 2008 at 8:40 AM, Chris [EMAIL PROTECTED] wrote: I'm trying to run a simple app through Apache via mod_wsgi. Following the directions at http://wiki.pylonshq.com/display/pylonscookbook/mod_wsgi+and+workingenv.py I've gotten the simple

best practices for static resources

2008-06-16 Thread Wichert Akkerman
I am trying to figure out what the best practices for dealing with static resources such as CSS, Javascript and images are. With a default pylons setup every request goes through two StaticURLParser instances and files returned by them do not get any caching headers. This is very practical for

RE: Preferred approach to extend Authkit to resource level access-control

2008-06-16 Thread [EMAIL PROTECTED]
Hi Jeremy, The easiest solution is to name your roles with the resource they apply to. Say you have resources r1, r2, and r3 you could name your roles: r1-edit r2-edit r3-edit r1-write r2-write etc As long as you don't use ``-`` characters elsewhere in the role name this works fine. You then

Re: Preferred approach to extend Authkit to resource level access-control

2008-06-16 Thread [EMAIL PROTECTED]
Hi Jeremy, My suggestion would be to set up a test environment and benchmark it. That's the only way to know for sure. I'd be very surprised if performance was an issue unless you are doing something really unusual. At the end of the day if you are using the SQLAlchemy driver a permission check

Re: Difference between controllers and views?

2008-06-16 Thread [EMAIL PROTECTED]
On 12 juin, 04:12, Shannon -jj Behrens [EMAIL PROTECTED] wrote: (snip) I agree with Ben. Having classes with methods has all sorts of OO benefits. Consider, you can implement __getattr__ and do all sorts of cool tricks. It's also nice to share a bunch of code and data via self. If you

Re: best practices for static resources

2008-06-16 Thread Cliff Wells
On Mon, 2008-06-16 at 13:03 +0200, Wichert Akkerman wrote: I am trying to figure out what the best practices for dealing with static resources such as CSS, Javascript and images are. With a default pylons setup every request goes through two StaticURLParser instances and files returned by

Re: best practices for static resources

2008-06-16 Thread Cliff Wells
On Mon, 2008-06-16 at 14:26 -0700, Cliff Wells wrote: On Mon, 2008-06-16 at 13:03 +0200, Wichert Akkerman wrote: I am trying to figure out what the best practices for dealing with static resources such as CSS, Javascript and images are. With a default pylons setup every request goes

Re: best practices for static resources

2008-06-16 Thread Jonathan Vanasco
i do this: server { listen 80; server_name myapp.com www.myapp.com ; access_log /var/log/nginx/myapp/myapp.com-access.log main; error_log /var/log/nginx/myapp/myapp.com-error.log ; location ~ ^/(_img|_css|_js) { include

Re: WSGI Fails ImportError: No module named deploy

2008-06-16 Thread Chris Spencer
Turns out easy_install PasteDeploy installs to site-packages/PasteDeploy-1.3.1-py2.5.egg/paste/deploy instead of site-package/paste/deploy. Not sure why that's the default behavior... On Mon, Jun 16, 2008 at 4:38 AM, Wichert Akkerman [EMAIL PROTECTED] wrote: Previously Mike Orr wrote: On

Adding content-length in all responses

2008-06-16 Thread Cucho
Hi! At work we need to add the content-length header in all our responses, but we don't want to hack any method in our controllers to do that. Is there any way to factor out this behaviour in a single place? Thanks Agustin --~--~-~--~~~---~--~~ You received

Re: Plyons WSGI on Apache2.2

2008-06-16 Thread Graham Dumpleton
Read: http://code.google.com/p/modwsgi/wiki/ConfigurationIssues Not sure why you want run a single thread. From memory would only want to do that if trying to attach gdb to daemon process and debug at C code level. Graham On Jun 16, 3:52 am, Chris [EMAIL PROTECTED] wrote: I've gotten