[web2py] Auth and CAS

2010-08-24 Thread huimies
Hi, What are the latest in integrating Auth with CAS? I found this bit in the auth code: # use a central authentication server cas = self.settings.login_form cas_user = cas.get_user() if cas_user: cas_user[passfield] = None

[web2py] Re: Auth and CAS

2010-08-24 Thread huimies
I just found out that you can actually share sessions with other apps by adding this to your model: session.connect(request, response, masterapp='myapp') That solved the problem of having to authenticate separately for each app. On Aug 24, 11:26 am, huimies huim...@gmail.com wrote: Hi, What

[web2py] Query string to static file url

2010-08-19 Thread huimies
Hi, Is there a built-in way set a query string for my static file urls or should I start working on my own implementation? I.e. myimage.gif? v=1234 where 1234 is a hash of that file. I would need this in order to set cache headers correctly with Nginx. If there isn't, what would be a good way to

[web2py] Re: Query string to static file url

2010-08-19 Thread huimies
I'm serving all static files using nginx and I'm setting cache header for files in static folder to never expire. So I need way of telling to the browser that a file is changed and thus use a hash in its url.

[web2py] Re: Query string to static file url

2010-08-19 Thread huimies
That's correct. And it works like this: location ^~ /myapp/static/ { root /var/www/web2py/applications/myapp/static; if ($query_string) { expires max; } } Which means that it sets a never expire cache header for all files served from

[web2py] Createing deployment packages

2010-08-13 Thread huimies
Hi, I'm setting up continuous integration for web2py apps. I couldn't find any recipes for creating deployment packages from command line. Are there any tools available for this or should I just create my own using w2p_pack in gluon.fileutils?

[web2py] Using web2py auth from Tornado

2010-08-09 Thread huimies
Hi, I've set up web2py using tornado server like this: web2py_app = tornado.wsgi.WSGIContainer(gluon.main.appfactory(logfilename=None, profilerfilename=None)) application = tornado.web.Application([ (r/async, MyHandler), (r.*, FallbackHandler, dict(fallback=web2py_app)),

[web2py] Re: Using web2py auth from Tornado

2010-08-09 Thread huimies
Yes, that works, but I mean I need to do this inside MyHandler. And that isn't web2py any more.

[web2py] Re: Using web2py auth from Tornado

2010-08-09 Thread huimies
Yes, that's what I have done and I got the logged in user's id. My colleague just got an excellent idea of exposing a json api in our web2py app for checking permissions. Then tornado handlers can query permissions through http and we don't have this problem. I just wonder if there are some