[web2py] Prepopulating a form

2015-07-14 Thread dt0901
Hi. I can't see my last post, so can't add to the thread. but is this the correct way to do it: adding the form.var.phone before the accept? def testform(): record = db(db.config.type=="SMS_NUMBER").select(db.config.txt).first() smsNumber = record.txt if record else '' form=FORM('Pho

[web2py] prepopulated form

2015-07-12 Thread dt0901
Hi, I think this is one that a few people have put on the forum but i don't think it's been answered properly (or I've just missed it). Basically, I would like a form, controls determined by my choosing by the fields (initialisation). ideally in pseudo code something like this: def creat

[web2py] Auditing Auth Tables

2015-06-15 Thread dt0901
Hi, Excellent product web2py but still trying to get my head around some of the structure and some burning questions from the documentation. Question 1: I want my auth tables to have an audit table. So i uncommented the following line in db.py: auth.enable_record_versioning(db) Now this did

[web2py] Auth Roles

2015-06-15 Thread dt0901
Hi, Excellent product web2py but still trying to get my head around some of the structure and some burning questions from the documentation. Question 2: Hi at the moment every time a user registers, a new 'role' is created for the user. Basically I want three roles: USER STAFF ADMIN Admin goes