Re: [web2py] Re: use memcache

2017-04-12 Thread 黄祥
done with steps : *# fork repository* mkdir ~/git/ cd ~/git/ git clone --recursive https://github.com/sugizo/web2py.git cd web2py/ *# List the current configured remote repository for your fork* git remote -v *# Specify a new remote upstream repository that will be synced with the fork* git remo

Re: [web2py] Re: use memcache

2017-04-12 Thread Paolo Valleri
you have to clone your fork, which I guess is https://github.com/sugizo/web2py then follow the same steps, at the end, from the github website create a PR. Mind that your fork (https://github.com/sugizo/web2py) is really out of date, update it before everything else. Paolo 2017-04-12 12:40 GMT+0

Re: [web2py] Re: use memcache

2017-04-12 Thread 黄祥
tried to pull request on git, result not expected, here is the step i took : *# fork web2py* cd ~/Git/ git clone --recursive https://github.com/web2py/web2py.git cd web2py/ git submodule update --init --recursive *# Create the branch on your local machine* git checkout -b fix_memcache_appadmin *#

Re: [web2py] Re: use memcache

2017-04-11 Thread Paolo Valleri
Regarding the PR, online there are many tips to help you, in short: - fork web2py - create a new branch (called for example: 'fix_memcache_appadmin') - apply the change we discussed - commit the change with a clear message - push only the new branch - on github, click Pull request and compare web2p

Re: [web2py] Re: use memcache

2017-04-11 Thread 黄祥
*whole traceback :* Traceback (most recent call last): File "/Users/MacBookPro/site/web2py/gluon/restricted.py", line 227, in restricted exec ccode in environment File "/Users/MacBookPro/site/web2py/applications/a/controllers/appadmin.py"

Re: [web2py] Re: use memcache

2017-04-11 Thread Paolo Valleri
Glad the change fixed the first issue, would you submit a PR https://github.com/web2py/web2py/pulls? Regarding the second error, post the whole traceback here Paolo 2017-04-11 0:11 GMT+02:00 黄祥 : > *change gluon/contrib/memcache/__init__.py* > class MemcacheClientObj(Client): > def initial

Re: [web2py] Re: use memcache

2017-04-10 Thread 黄祥
*change gluon/contrib/memcache/__init__.py* class MemcacheClientObj(Client): def initialize(self): pass *start web2py* python ~/web2py/web2py.py --nogui --no-banner -a 'a' -i 0.0.0.0 -p 8000 *create new webapp and add code on top of models/db.py* from gluon.contrib.memcache import Mem

Re: [web2py] Re: use memcache

2017-04-10 Thread Paolo Valleri
Have you restarted web2py after the change? Paolo 2017-04-10 0:02 GMT+02:00 黄祥 : > after adding the code, still got the same error : AttributeError: > 'MemcacheClientObj' object has no attribute 'initialize' > *e.g.* > class MemcacheClientObj(Client): > def initialize(self): > pass

[web2py] Re: use memcache

2017-04-09 Thread 黄祥
after adding the code, still got the same error : AttributeError: 'MemcacheClientObj' object has no attribute 'initialize' *e.g.* class MemcacheClientObj(Client): def initialize(self): pass btw the problem is fixed when not assigned it into cache.ram and cache.disk *e.g.* #cache.ram =

[web2py] Re: use memcache

2017-04-09 Thread Paolo Valleri
Regarding the first problem you posted. Try adding: def initialize(self): pass in https://github.com/web2py/web2py/blob/master/gluon/contrib/memcache/__init__.py#L22 Let us know. Paolo On Friday, April 7, 2017 at 12:29:14 AM UTC+2, 黄祥 wrote: > > Tried to learn about memcache, creat