[web2py] Clear memcache on GAE

2010-08-09 Thread Jérémie
attribute when using memcache on GAE. Here are my questions : 1. Is there any method or attribute similar to 'storage' for memcache on GAE ? And could it be implemented in gae_memcache.py ? 2. Am i doing this all wrong ? Should i better cache each dict individually with memcache ? 3. Should i handle this in a completely different way ? Let me know i am not clear enough, Thanks for your help, Regards, -- Jérémie

[web2py] Re: Clear memcache on GAE

2010-08-12 Thread Jérémie
explain me where i am wrong ? thanks for your help, regards, -- Jérémie On 11 août, 15:15, mdipierro wrote: > It will work if you setup gae memcache and point cache.ram to it. It > is explained in the book in the GAE section > > On Aug 11, 7:45 am, howesc wrote: > > > > > i

[web2py] Re: Clear memcache on GAE

2010-08-13 Thread Jérémie
on the same way. Jérémie On 13 août, 11:18, mdipierro wrote: > Dear Jeremie, > > I did not write the memcache code myself but I looked into it (gluon/ > contrib/memcache/__init__.py). I found this line > >         #key = > self.__keyFormat__(key) > > And I am puzzled by

[web2py] Re: Clear memcache on GAE

2010-08-13 Thread Jérémie
wow, thanks for that investigation... it works well for the delete statement (which is what i needed) just for information, the "get" statement returns : "A server error occured. Please contact the administrator.". Thank you Massimo for helping me, regards, -- Jérémie

[web2py] [snippet] Unit test and auth.has_membership or auth.requires_login

2011-03-17 Thread Jérémie
auth.login_bare("usern...@domain.com","password") Hope that will help anybody, if not, sorry for beating a dead horse, Jérémie PS : i am using a test_db so it does not modify my dev database

[web2py] Re: Unit test and auth.has_membership or auth.requires_login

2011-03-17 Thread Jérémie
PPS : sorry, i was not using test_db (was commented) and cannot use it right now cause you need to (re)define auth - so you have another useless user in your dev db

[web2py] Unit test and request object

2011-04-06 Thread Jérémie
assertEqual(len(result["errors"]), new_status() edit_status() The edit_record() function belongs to the parameters.py controller. My problem is : when i do logger.debug(request.vars) in the edit_record() function, on the second call (when adding new status), it displays the whole request.vars, i mean, i do also have request.vars from ressources (begda, endda...). I thought the request = Request() would reset and clead the request object. I've simplified the code to make it readable but it keeps the logic. Could someone tell me what i am doing wrong ? Thanks for your help, Jérémie

[web2py] Re: Unit test and request object

2011-04-07 Thread Jérémie
values (e.g request.vars in my case), use : clean = app_cleanup('init', request) (note : replace 'init' by your app name) Maybe there is a better way but i didn't find it Jérémie

[web2py] Re: Unit test and request object

2011-04-07 Thread Jérémie
Sorry for multiposting. Yet, that last solution does not work either. Maybe i am missing something within variable range but having these unit tests working is just a pain in the a... Thanks for any help, Jérémie

[web2py] Re: Unit test and request object

2011-04-08 Thread Jérémie
ller = 'default' self.request = pickle.dumps(request) def setUp(self): global response, session, request, auth session = pickle.loads(self.session) request = pickle.loads(self.request) auth = Auth(globals(), db) auth.define_tables() In case anybody would need it. Jérémie