[web2py] Re: Hardcoded Drop Down Menu In Form

2014-11-26 Thread T.R.Rajkumar
Its not INPUT. Its SELECT. See the code below. def get_shifts(): return [1,2,3,G] shifts = get_shifts() form = FORM(TABLE( TR('AgtNo:',SELECT(_name='cmbAgtNo',_id='cmbAgtNo', requires=IS_NOT_EMPTY(),*[OPTION(str(x.agt_no) + x.work_desc,_value=x.id) for x in agts] )),

[web2py] get record id to delete row in table

2014-11-26 Thread Yebach
Hello I have a table and a SQLFORM.grid in my view. In SQLFORM.grid I show list of active workers and in my table I show all inactive workers. I am not using a SQLFROM for both since showing two results in double forms after edit/view click In my table of inactive workers I have a button

[web2py] Re: assign users to default group on register?

2014-11-26 Thread Niphlod
http://web2py.com/books/default/chapter/29/09/access-control#Authorization On Wednesday, November 26, 2014 8:46:57 AM UTC+1, LoveWeb2py wrote: Hello, Is there an easy way to assign users to a default group when registering? I'm going through the Auth source code and didn't see anything for

Re: [web2py] Re: Sticky sessions in a distributed environment

2014-11-26 Thread Louis Amon
Ok I think I found where the problem lies: In applications/admin/models/access.py we have this structure: if request.env.web2py_runtime_gae: session_db = DAL('gae') session.connect(request, response, db=session_db) hosts = (http_host, ) is_gae = True else: is_gae = False

[web2py] Re: Sticky sessions in a distributed environment

2014-11-26 Thread Leonel Câmara
How will you get your db configuration in admin? I don't think it should have all these ifs and elifs specially for heroku when this isn't heroku specific, this is about how you can configure the admin to store cookies in the DB. Maybe just add an option in settings.cfg to configure the

Re: [web2py] Re: Sticky sessions in a distributed environment

2014-11-26 Thread Louis Amon
I can’t find any documentation about settings.cfg. How does it work ? Where is it loaded ? Is it application-specific ? I’m not sure setting a connection string in a file is the way to go with Heroku : you don’t really have those (they are dynamically generated). When you create a db in Heroku

Re: [web2py] Re: Sticky sessions in a distributed environment

2014-11-26 Thread Anthony
On Wednesday, November 26, 2014 8:34:58 AM UTC-5, Louis Amon wrote: I can’t find any documentation about settings.cfg. How does it work ? Where is it loaded ? Is it application-specific ? settings.cfg is in /web2py/applications/admin/ and is specific to the admin app. Currently it only

Re: [web2py] Re: Sticky sessions in a distributed environment

2014-11-26 Thread Louis Amon
After a whole day of struggling I came to the conclusion that this is more of a design flaw than a bug : Appadmin is designed to check credentials with another application (admin). The default behaviour of the credential checking system does not allow any modification and has to be done with

Re: [web2py] Re: Sticky sessions in a distributed environment

2014-11-26 Thread Niphlod
I agree, but let us remind that the admin app is not meant to be deployed anywhere in production: its probably the reason why the corner-case surfaced now instead of some time ago. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py