[web2py] How do you change memcache session expiry?

2012-09-27 Thread Robert Clark
(Using web2py 1.99.7. Running on Ubuntu/EC2 with Elasticache) I've followed the deployment recipe for storing sessions in memcache but they expire after 300 seconds of inactivity. That appears to be because MEMDB doesn't look to pass down a time_expiry, therefore the set() function from gluon

[web2py] Re: How do you change memcache session expiry?

2012-09-28 Thread Robert Clark
Thanks, I am not having any problems with the memcached api & python interface, that part all works as advertised. The problem is that if you follow the deployment recipe for storing sessions in Memcached, then they always expire after 300s and there's no way to provide an expiry. Here's what'

[web2py] How can you configure memcache and built-in cache to be present at the same time

2012-05-16 Thread Robert Clark
Is there a way to configure both MemcacheClient and the built-in cache at the same time? We would like to use built-in cache to hold singleton or short-life python objects across requests (being a process-only cache it suits well) and Memcache for everything else (sessions and expensive-to-cre

[web2py] Re: How do you change memcache session expiry?

2012-09-29 Thread Robert Clark
r 2012 07:11:10 UTC-5, Niphlod wrote: >>> >>> yep, open a bug on http://code.google.com/p/web2py/issues/list >>> >>> On Saturday, September 29, 2012 5:24:07 AM UTC+2, Robert Clark wrote: >>>> >>>> Thanks, I am not having any problems wi

[web2py] Re: web3py?

2012-12-10 Thread Robert Clark
A couple of days ago in the "web3py important!" thread I posted some thoughts on URL route matching syntax for the @expose() method, but my post is yet to surface. Posting a more-considered version here for consideration and feedback. I've been looking into some other frameworks, and Alloy

Re: [web2py] Re: web3py?

2012-12-10 Thread Robert Clark
ec 10, 2012 at 9:33 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > web3py does that already. Although it does not support the exact syntax > you proposed. Did you try it? > > > On Monday, 10 December 2012 17:42:20 UTC-6, Robert Clark wrote: >> >&g

[web2py] SQLFORM.grid and custom display values from fields not displayed in the table.

2012-01-13 Thread Robert Clark
Can I first say that SQLFORM.grid is great and a massive productivity gain, thanks Massimo & the rest of the web2py team. My question is around formatting a column when the display value depends on other non-visible columns (or other related tables). We're using the "links" parameter and a lambda

[web2py] Executing controller- and function-specific models in web2py shell

2012-01-15 Thread Robert Clark
If running a web2py shell, how can model files within controller subdirectories be made available in the environment? For example if we have these two model files: myapp/models/db.py myapp/models/acontroller/db_controller.py Then when launching web2py using: $> python web2py.py -S myapp -M Typi

[web2py] Re: Found a bug: XMLRPC with basic authorization fails

2011-10-23 Thread Robert Clark
Hi Massimo Here are the steps to reproduce this problem in web2py 1.99.2 (these steps worked fine on 1.98.x versions) 1) In web2py admin create "New simple application" called "foo" 2) Add to db.py: auth.settings.allow_basic_login = True 3) Decorate call() with @auth.requires_login in defau

[web2py] Is there a controller post-action hook? Or should we use a decorator.

2011-11-12 Thread Robert Clark
Is there a simple way to register code for execution after each controller action has been executed? Our problem is that most of our controller actions eventually obtain a pymongo connection object (from cache.ram) which itself pools connections internally and are thread-safe. These connection o

[web2py] Can local_import() import a class definition?

2011-06-28 Thread Robert Clark
I can't seem to get local_import() importing classes from module files in the same way 'from X import Y' normally works in Python. Say I have the following in mymodule.py def my_func(arg1): doSomething(arg1) class my_class(object): __init__(self): ...etc. my_class_ref = my_class

[web2py] Re: Can local_import() import a class definition?

2011-06-28 Thread Robert Clark
ass() > > It is veyr odd and I do not think this has anything to do with > local_import. Something else is going on. > Anyway, local_import is deprecated. Try > > from mymodule import my_class > > this should work now even if mymodule is in applications/yourapp/ > modules/