[web2py] add_membership, del_membership, add_membership = IntegrityError (is_active)

2015-10-19 Thread sunny
Hi, I ran into a problem with memberships: When I add a membership to a user and delete it afterwards the record is not actually removed from the table but is_active is set to 'F '. I can check with has_membership and it is False. But now I'm unable to add the same membership again, because it

[web2py] Re: add_membership, del_membership, add_membership = IntegrityError (is_active)

2015-10-19 Thread 黄祥
the web2py version is quite old :) btw, i think it's about how auth.signature work. the auth.signature contain table field is_active with boolean field type, so if user delete the data (not just the auth_membership), it automatically set the is_active into False (F) into the data that you choose

Re: [web2py] add_membership, del_membership, add_membership = IntegrityError (is_active)

2015-10-19 Thread 'Sven Slezák' via web2py-users
thanks, stifan. this will be my work around but how is it supposed to work? or is this fixed in a newer version of web2py? > Am 19.10.2015 um 11:34 schrieb 黄祥 : > > the web2py version is quite old :) > btw, i think it's about how auth.signature work. the auth.signature contain > table field is_

Re: [web2py] add_membership, del_membership, add_membership = IntegrityError (is_active)

2015-10-19 Thread 黄祥
nope, the recent version (2.12.3) have the same auth.signature that work like that. if you realy want to delete the data (not just set the is_active into False when user delete it from web application), i think you can disable auth.signature in your table definition, or simply just remove it fro

[web2py] droidanalyst.org is not loading

2015-10-19 Thread Vineeta Jain
www.droidanalyst.org is a website working through web2py framework. The website is not loadimg from.past few days. It is giving an error "DNS host not reachable". Please provide assistance and help us solve the problem. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation)

Re: [web2py] add_membership, del_membership, add_membership = IntegrityError (is_active)

2015-10-19 Thread 'Sven Slezák' via web2py-users
actually, I don't care if the record is deleted or not. ;-) I want to be able to remove memberships and reset them later with the same mechanism (auth.add_membership, auth.del_membership, auth.add_membership). is this considered a bug? or is there a different handling I have to use with auth.signa

Re: [web2py] Re: Can web2py "front-end" an API?

2015-10-19 Thread António Ramos
DAL as a webservice ? like a REST endpoint ? There is something like that and i like it http://loopback.io/ 2015-10-18 13:48 GMT+01:00 Anthony : > Maybe check out the IMAP adapter > for > some ideas. > > Anthony > > > On Sund

Re: [web2py] Re: WEB2PY FOR MANAGING RESOURCES

2015-10-19 Thread António Ramos
2015-10-17 8:19 GMT+01:00 Laurent Lc : > grr http://fullcalendar.io/ -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because

[web2py] Re: droidanalyst.org is not loading

2015-10-19 Thread Leonel Câmara
It's working for me. The problem is probably with your ISP DNS server, try using 8.8.8.8 as your DNS and see if you can reach it. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/l

[web2py] Re: How to show query on a grid?

2015-10-19 Thread Fabiano Almeida
Delete the db before ((db.guest.id>0)... worked query = ((db.guest.id>0) & \ > (db.voucher.disp == False) & \ > (db.voucher.guest == db.guest.id) & \ > (db.auth_user.id == db.guest.fnd)) \ > .select(db.voucher.voucher, db.guest.name, db.auth_user.id , > db.auth_user

[web2py] Re: droidanalyst.org is not loading

2015-10-19 Thread Niphlod
this group becoming a pingcheck for all web2py-powered sites = MegaLOL On Monday, October 19, 2015 at 3:14:00 PM UTC+2, Leonel Câmara wrote: > > It's working for me. The problem is probably with your ISP DNS server, try > using 8.8.8.8 as your DNS and see if you can reach it. > -- Resources:

[web2py] Re: 2.12.1 is out

2015-10-19 Thread Ron Chatterjee
Does anyone has any issues downloading the latest Source Code from web2py site? Because when I do python web2py.py I get hit with the error: \...\...\gluon\sqlhtml.py", line 32, in from pydal.helpers.methods import smart_query, bar_encode, _repr_ref ImportError: cannot import name _repr_ref.

[web2py] Re: 2.12.1 is out

2015-10-19 Thread Niphlod
I'd imagine you are running with an unpinned version of pydal. Travis and appveyor (our CI) are not failing. On Monday, October 19, 2015 at 5:07:33 PM UTC+2, Ron Chatterjee wrote: > > Does anyone has any issues downloading the latest Source Code from web2py > site? > > Because when I do python w

[web2py] Re: 2.12.1 is out

2015-10-19 Thread Ron Chatterjee
Niphlod, I don't know what you just said, can you please break it down for me? What you mean unpinned version of pydal? I have a local version of pydal installed in my site packages. On Monday, October 19, 2015 at 11:21:05 AM UTC-4, Niphlod wrote: > > I'd imagine you are running with an unpinn

[web2py] Re: 2.12.1 is out

2015-10-19 Thread Niphlod
any version of web2py is tested to run with a TAGGED version of pydal. You can't mix and match. For example, current web2py works with pydal 15.09 . On Monday, October 19, 2015 at 5:25:53 PM UTC+2, Ron Chatterjee wrote: > > Niphlod, I don't know what you just said, can you please break it down fo

Re: [web2py] Re: 2.12.1 is out

2015-10-19 Thread Richard Vézina
Ron did you download web2py from Github or from web2py site... The latter should prevent fromt this issue, but if you use Git repo, you need to update pyDAL submodule, that what Niphold is explaning... Richard On Mon, Oct 19, 2015 at 11:34 AM, Niphlod wrote: > any version of web2py is tested to

Re: [web2py] Re: 2.12.1 is out

2015-10-19 Thread Ron Chatterjee
I downloaded from web2py site. Anyway, I did pip uninstall pydal from my site packages and now it works fine. Somehow it was conflicting with the local pydal copy. Thanks for the help. I appreciate it! On Monday, October 19, 2015 at 11:39:20 AM UTC-4, Richard wrote: > > Ron did you download w

Re: [web2py] add_membership, del_membership, add_membership = IntegrityError (is_active)

2015-10-19 Thread Massimo Di Pierro
please open an issue about this so we track it and fix it. On Monday, 19 October 2015 05:58:37 UTC-5, sunny wrote: > > actually, I don't care if the record is deleted or not. ;-) > I want to be able to remove memberships and reset them later with the same > mechanism (auth.add_membership, auth.de

[web2py] Re: Can web2py "front-end" an API?

2015-10-19 Thread Massimo Di Pierro
yes. that would be really neat! On Sunday, 18 October 2015 04:20:52 UTC-5, Leonel Câmara wrote: > > You could make a a DAL adapter yes. In fact one could argue that all DAL > adapters are facades for APIs. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://git

Re: [web2py] Re: 2.12.1 is out

2015-10-19 Thread Richard Vézina
Hello Ron, Do you know virtualenv? You can avoid this kind of issue with it... Get started... Ref : http://docs.python-guide.org/en/latest/dev/virtualenvs/ Richard On Mon, Oct 19, 2015 at 12:04 PM, Ron Chatterjee wrote: > I downloaded from web2py site. Anyway, I did pip uninstall pydal from

[web2py] Re: more simple form field for search in some table coloumn

2015-10-19 Thread Dave S
On Sunday, October 18, 2015 at 5:28:14 PM UTC-7, 黄祥 wrote: > > something like this is not work either > e.g. > table= db.test > search = request.vars.search > field_objects = [f for f in table] > if search: > for field_object in field_objects: > rows = db(field_object.contains(search)).select() >

Re: [web2py] Re: 2.12.1 is out

2015-10-19 Thread Ron Chatterjee
You are right. I should use venv. Haven't tried with web2py. But I agree. On Monday, October 19, 2015 at 1:22:19 PM UTC-4, Richard wrote: > > Hello Ron, > > Do you know virtualenv? > > You can avoid this kind of issue with it... > > Get started... > Ref : http://docs.python-guide.org/en/latest

Re: [web2py] Re: 2.12.1 is out

2015-10-19 Thread Richard Vézina
You may still use web2py without venv, but consider using it for stuff like pyDAL... :) It all depends of your needs and number of projects you manage... Even if venv is always a better idea, I would say as a rule of thumb, if you didn't face any issue, and only manage one app and only use web2p

[web2py] transform a row from a request to a line editable

2015-10-19 Thread Laurent Lc
Hi, Could you tell me how in can change this line in a a response editable form = db1(db1.user.id == request.args(0)).select() Thank you Nb: i 'd like to know why one field of my menu disapears when i browse my app -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: transform a row from a request to a line editable

2015-10-19 Thread Laurent Lc
Forget my question i think that a SQLFORM.GRID should be ok, i gonna test Le lundi 19 octobre 2015 20:49:56 UTC+2, Laurent Lc a écrit : > > Hi, > > Could you tell me how in can change this line in a a response editable > > form = db1(db1.user.id == request.args(0)).select() > > Thank you > > Nb: i

[web2py] Re: transform a row from a request to a line editable

2015-10-19 Thread Laurent Lc
In fact it does not work : My function : @auth.requires_login() def update(): query = (db1.user.id == request.args(0)) records = SQLFORM.grid(query=query,user_signature=True) return dict(records=records) Le lundi 19 octobre 2015 21:00:13 UTC+2, Laurent Lc a écrit : > > Forget my ques

[web2py] Re: transform a row from a request to a line editable

2015-10-19 Thread Laurent Lc
Forget the menu sorry Le lundi 19 octobre 2015 21:11:31 UTC+2, Laurent Lc a écrit : > > In fact it does not work : > My function : > > @auth.requires_login() > def update(): > query = (db1.user.id == request.args(0)) > records = SQLFORM.grid(query=query,user_signature=True) > return di

[web2py] Re: Handle runtimeErrors with try/except

2015-10-19 Thread argenio . bosanto
I try it, and this don't work :s I get the same traceback :s I need this for the validation :s -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You recei

[web2py] Rest Webservice client json parsing

2015-10-19 Thread CMHSlipSliding
I'm a newbie to web2py and I am connecting to a webservice ( using requests ) and I get my json data back that I would like to parse and store in my database. The data comes in fine but I'm unsure on how to parse it or if there is a recommended parser to use ? any help is appreciated... -- Reso

[web2py] Re: more simple form field for search in some table coloumn

2015-10-19 Thread Massimo Di Pierro
also work with list types. On Monday, 19 October 2015 13:03:14 UTC-5, Dave S wrote: > > > > On Sunday, October 18, 2015 at 5:28:14 PM UTC-7, 黄祥 wrote: >> >> something like this is not work either >> e.g. >> table= db.test >> search = request.vars.search >> field_objects = [f for f in table] >> if

[web2py] how to test if a controller function exists

2015-10-19 Thread A3
I want to be able to test if a certain function exists in a controller. (I am loading a component with help of another) controller: default.py def myfunction() return def mytest() if exists(myfunction()): do this. -- Resources: - http://web2py.com - http://web2py.com/bo

Re: [web2py] Rest Webservice client json parsing

2015-10-19 Thread Carlos Cesar Caballero Díaz
web2py includes a JSON encode-decoder, you can import it from gluon.contrib.simplejson so, according to the book, this should work: json_object = gluon.contrib.simplejson.loads(json_string) Regards. El 19/10/15 a las 10:01, CMHSlipSliding escribió: I'm a newbie to web2py and I am connecting

[web2py] Re: transform a row from a request to a line editable

2015-10-19 Thread Laurent Lc
Solved Sorry sometimes you need to write stupid things for finding Le lundi 19 octobre 2015 21:42:42 UTC+2, Laurent Lc a écrit : > > Forget the menu sorry > > Le lundi 19 octobre 2015 21:11:31 UTC+2, Laurent Lc a écrit : >> >> In fact it does not work : >> My function : >> >> @auth.requires_login

[web2py] Re: Rest Webservice client json parsing

2015-10-19 Thread Leonel Câmara
Note that Python itself already has a json encoder/decoder so if you're using a remotely modern version of Python the one you should use is the python included json module (just import json). -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/w

[web2py] Re: Handle runtimeErrors with try/except

2015-10-19 Thread Anthony
Actually, looks like it is a RuntimeError, but are you sure the code triggering the exception is actually inside your try/except block (looks like it's your DAL() definition line in 00db.py)? Looks like the database user/password is incorrect, in which case, once you correct it, there should be

[web2py] Re: more simple form field for search in some table coloumn

2015-10-19 Thread 黄祥
yes, you all right, i have another field that non string or list type of field. thank you so much all for explaination and pointer. best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.goog

[web2py] how to test if a controller function exists

2015-10-19 Thread Anthony
Can you explain in more detail what you are trying to do? There may be a better approach. Also, how do you identify the function to be called - do you have it's name? Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source co

[web2py] Re: Rest Webservice client json parsing

2015-10-19 Thread Niphlod
if you're using requests, you have the already decoded dict in r.json(), e.g. r = requests.get('http://api/url.json') python_dict = r.json() -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/w

[web2py] Re: how to test if a controller function exists

2015-10-19 Thread Anthony
If you have the function name, you can do: if function_name in globals(): And if you have the actual function object, you can do: if function.__name__ in globals(): Note, those will yield hits even if there is an object of that name defined in a model file. If that is a concern, you ca

[web2py] OS X Permissions question: echo works in ../web2py but not ../web2py/applications?

2015-10-19 Thread Tom Campbell
In the most recent version of Mac OS X, if I'm in the web2py directory this works fine: echo "# todo" >> README.md Yet if I'm in web2py/applications or any of its subdirectories I get a "Permission denied" error. What incredibly stupid thing am I doing wrong? -- Resources: - http

[web2py] Ractive and Single Page Apps

2015-10-19 Thread Rod Watkins
Hello everyone, I am hoping some of you who have already been using ractive.js may be able to help me. I'd like to create a single page app. The usual frameworks for doing so, from what I've read, are angular, backbone (+ marionette) and ember. I've studied angular and ember and each seems to b

[web2py] upload field type doesn't show in grid or smartgrid

2015-10-19 Thread 黄祥
hi, i have upload field type doesn't show in grid or smartgrid, in the older version i believe it shown by default. is it normal in the recent version (2.12.3) not shown the upload field type by default? ref: http://web2py.com/books/default/chapter/29/03/overview#Adding-grids p.s. in the book

[web2py] Re: Ractive and Single Page Apps

2015-10-19 Thread Niphlod
ractive does just templating and data binding. nothing else. If you need a routing system, use a routing library. One of the best/worst things of javascript (node too) is that the world is littered by thousands of small little libraries that you can mix and match. There's no clear path, nor a c