[web2py] Is it intended that TABLE(rows) makes a table within a table?

2015-10-24 Thread Edward Shave
TABLE(rows) is a nice shorthand way to make a table but I'm getting a table within a table starting as below. ... Is this right? Or should I not be doing this anyway? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: Is it intended that TABLE(rows) makes a table within a table?

2015-10-24 Thread Anthony
Rows objects have an .xml() method that serializes them to a SQLTABLE, so when you include them directly in a view (e.g., {{=rows}}) or inside another HTML helper (such as TABLE), you get a TABLE. In short, no need to wrap it in TABLE(). Anthony On Saturday, October 24, 2015 at 9:22:59 AM

[web2py] Re: Is it intended that TABLE(rows) makes a table within a table?

2015-10-24 Thread Anthony
Also, note that the reason for the odd behavior is that TABLE must take one of the HTML elements that is allowed inside the tag, such as tbody, thead, tfoot, tr, col, or colgroup). If you pass anything else, it will be wrapped in a TR by default. Anthony On Saturday, October 24, 2015 at

[web2py] Re: Appconfig - what's the best way to handle missing values

2015-10-24 Thread 'DenesL' via web2py-users
from gluon.contrib.appconfig import AppConfig myconfig = AppConfig('/private/appconfig.ini', reload=False) does not cause an exception even when loading the default ini below, which has an empty value (last one): ; App configuration ; db configuration [db] uri = sqlite://storage.sqlite

[web2py] Re: Course Subscription form

2015-10-24 Thread 黄祥
i think you can use the query (count() ) and check condition according to your need (if query >= value), if condition meet, redirect to another page redirect(URL(redirect) ), if not insert the data (db.table.insert() ). best regards, stifan -- Resources: - http://web2py.com -

[web2py] uwsgi/nginx encode error

2015-10-24 Thread Gustavo Moreira Freitas
Hi guys, i have some issues to send json with special chars. i am using nginx,ubuntu 14.04 uwsgi and web2py. as follwing images, when i send a json without special chars (like ç é) it bring me response ,request.post_vars or **vars not empty. However when i sent any special chars i got

[web2py] Code in view seems not to be processing variables passed by sessions

2015-10-24 Thread Arlindo Gomes Filho
Hi everybody, I’m beginner, trying to develop a code in which the user is asked to answer three questions (presented in two sequential forms) and, based on the combination of those answers the code (in the view “result”) is supposed to present the user the one procedure among four available

[web2py] Course Subscription form

2015-10-24 Thread Wadson Dias
Hi everyone! How can I limit number of subscribers in certain course? Only 20 in Oficina 1, and 15 in oficina 2... My Model: db = DAL('sqlite://storage.sqlite') db.define_table('inscritos', Field('nome','string'), Field('email','string'),

[web2py] Appconfig - what's the best way to handle missing values

2015-10-24 Thread Donald McClymont
I like the appconfig file approach however I am not clear if there is a recommended approach to handling missing values in the file. It seems reasonable and convenient that you might want to update the code and the appconfig separately and use a default value if the key isn't present.

[web2py] Newby question about referencing fields in a lookup table

2015-10-24 Thread Bill Lugg
I am vary new to Web2py and am very impressed with what I see so far. I come from a MS Access background and am looking for an easy way to develop small db applications in similar fashion and offering some of the same features that are offered in Access, but without the proprietary chains

[web2py] cannot disable automatic login after registration

2015-10-24 Thread Pierre
Hi everyone, I tried to do it with no success with this: auth.settings.login_after_registration = False thanks for your help -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Encoding-related exceptions produced when doing DB inserts or lookups

2015-10-24 Thread Spokes
An application has suddenly started generating exceptions pertaining to encoding, when I attempt to perform database inserts or lookups. The lookup operation produces this exception: 3. Exception in 'Agent_Base check_comparable_record_exists_in_db()': 'ascii' codec can't decode byte 0xe2 in

[web2py] Re: How to check if my user's profile is complete in web2py?

2015-10-24 Thread 'DenesL' via web2py-users
Try http://www.web2py.com/books/default/chapter/29/07/forms-and-validators#onvalidation the example is pretty clear. On Saturday, October 24, 2015 at 8:28:15 PM UTC-4, Upendra Kumar wrote: > > I have made a 'user_details' table whose 'user_id' field I have referenced > to default

[web2py] How to check if my user's profile is complete in web2py?

2015-10-24 Thread Upendra Kumar
I have made a 'user_details' table whose 'user_id' field I have referenced to default 'auth_user' table. Now after registration, I show the user his profile and ask him to complete it. But, the problem is that how can I check if the profile is complete or not after the user submits the updated

Re: [web2py] Re: Enabling Google Sign-In

2015-10-24 Thread Donald McClymont
It is on github at https://github.com/bnmnetp/w2p-social-auth but doesn't appear to be getting maintained. I agree it would be good if it was more promoted - it seems to work but is using version 0.1.24 or so of psa which is a good bit behind latest version - but it seems to work fine with

[web2py] Re: Is it intended that TABLE(rows) makes a table within a table?

2015-10-24 Thread Edward Shave
Thanks Anthony, The reason I was trying TABLE was because I wanted to include a class in the table tag and was thinking this might work... TABLE(rows, _class="fred") taking account of your answer I'm now using... table_as_string = ''+rows.xml(0)[7:] -- Resources: - http://web2py.com -

[web2py] Re: Newby question about referencing fields in a lookup table

2015-10-24 Thread 'DenesL' via web2py-users
The second argument of IS_IN_DB should be the key to the reference. And the third should be a format string to represent that key. So your models should look something like db.define_table('t_itemtypes', Field('f_itemtypedesc_string', 'string'), ) db.define_table('t_items',

[web2py] Re: Is it intended that TABLE(rows) makes a table within a table?

2015-10-24 Thread 'DenesL' via web2py-users
You can do SQLTABLE(rows, _class="fred") On Saturday, October 24, 2015 at 5:29:17 PM UTC-4, Edward Shave wrote: > > Thanks Anthony, > > The reason I was trying TABLE was because I wanted to include a class in > the table tag and was thinking this might work... > > TABLE(rows, _class="fred") >

[web2py] Re: cannot disable automatic login after registration

2015-10-24 Thread 'DenesL' via web2py-users
You also need settings.registration_requires_verification = True On Saturday, October 24, 2015 at 8:30:52 PM UTC-4, Pierre wrote: > > Hi everyone, > > I tried to do it with no success with this: > > auth.settings.login_after_registration = False > > thanks for your help > > -- Resources: -

[web2py] SQLFORM.grid: trigger edit when clicking anywhere on the row itself

2015-10-24 Thread Julian Sanchez
Is there an easy way to trigger the same URL you get when pressing the built-in 'edit' button of the SQLFORM.grid without having to show that button? I have a few grids that would show cleaner if users could go directly to the edit page by clicking on the row itself (no need to view details).

[web2py] Re: Clean Bootstrap layout

2015-10-24 Thread pbreit
I'm not sure what exactly I need in my template for Web2py to work. On Friday, October 23, 2015 at 9:03:14 PM UTC-7, Dave S wrote: > > > > On Friday, October 23, 2015 at 5:38:29 PM UTC-7, pbreit wrote: >> >> Is there a nice, clean Bootstrap layout with none of the web2py cruft in >> it? Just the