Please open a ticket in google code. If this is a web2py but will fix
asap.
On Jul 6, 11:24 pm, Luis Goncalves lgoncal...@gmail.com wrote:
In fact, just to make sure there wasn't something hidden in my app affecting
the behavior,
I downloaded a fresh install of web2py,
and get the same
Done!
Thank you!!!
Luis.
On Thu, Jul 7, 2011 at 6:24 PM, Massimo Di Pierro
massimo.dipie...@gmail.com wrote:
Please open a ticket in google code. If this is a web2py but will fix
asap.
On Jul 6, 11:24 pm, Luis Goncalves lgoncal...@gmail.com wrote:
In fact, just to make sure there wasn't
You would suggest you do this instead
db.table.email.writable=False
in the controller, before defining the form.
Setting the field readonly in the view may still allow a malicious
attacker to tamper with the field value.
On Jul 6, 1:12 am, Luis Goncalves lgoncal...@gmail.com wrote:
I found
Good point!
Unfortunately, I am not expert enough to understand how to do this in my
case, because I am using the form=auth.register().
Wouldn't I have to do what you suggest inside Auth.register ?
(for an explanation of why I am doing this, see:
This should do it:
def user():
if request.args(0)=='register':
registrant = db(db.registrant.token ==
request.vars.token).select().first() or redirect(URL('error'))
db.auth_user.email.writable=False # gives error
db.auth_user.email.default=registrant.email
On Wednesday, July 6, 2011 2:04:26 PM UTC-4, Luis Goncalves wrote:
db.table_user.email.writable=False # gives error
I think this should be db.auth_user, not db.table_user. Note, the name of
the auth user table (which defaults to 'auth_user') is stored in
Both with Massimo's
auth.settings.table_user.email.default = registrant.email
auth.settings.table_user.email.writable=False
form=auth.register()
and with your
db[auth.settings.table_user_name].email.writable=False
Do you have:
auth.settings.registration_requires_verification = True
somewhere? If so, remove that line or set it to False. That attempts to send
a verification email to the user's email address (which is failing and
causing the error), which I assume you don't need given that your
Actually, I still want email verification to happen (because someone else
may stumble upon the link and register with a password unknown to the real
user).
Nevertheless, I disabled registration verification, and now I get an error
deep within gloun/tools.py
Error occurs after entering
My example did not have the line:
form=auth.register()
On Jul 6, 1:39 pm, Luis Goncalves lgoncal...@gmail.com wrote:
Both with Massimo's
auth.settings.table_user.email.default = registrant.email
auth.settings.table_user.email.writable=False
I still get the same error:
File /home/ubuntu/web2py/gluon/tools.py, line 1683, in register
user = self.db(table_user[username] == form.vars[username]).select().first()
KeyError: 'email'
I don't know if it makes a difference or not, but I'm using emails for login
(not a username) -- as
Are you sure your db.registrant has an email?
On Jul 6, 10:04 pm, Luis Goncalves lgoncal...@gmail.com wrote:
I still get the same error:
File /home/ubuntu/web2py/gluon/tools.py, line 1683, in register
user = self.db(table_user[username] ==
form.vars[username]).select().first()
Yes, when I click on the invite and go to the website I get the registration
form filled out with email (and name (excluded from my shortened example))
visible and non-editable.
Luis.
—«sent by mobile»—
On Jul 6, 2011 8:17 PM, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
Are you sure
In fact, just to make sure there wasn't something hidden in my app affecting
the behavior,
I downloaded a fresh install of web2py,
and get the same error:
File /home/pierluigi/web2py/gluon/tools.py, line 1796, in register
user = self.db(table_user[username] ==
Can you explain the logic? Are you trying to override whatever emails
is typed in by the user on registration?
On Jul 5, 12:08 pm, Luis Goncalves lgoncal...@gmail.com wrote:
This doesn't seem to work with auth() forms:
form = auth.register()
form.vars.email = 'l...@vision.caltech.edu'
Yes, I am trying to create an 'invitation' only registration,
where the person receives an email with a link (and identifying token),
and on my website I use the token to pre-populate the registration form,
so that the user only has to pick his password.
thx,
Luis.
On Tue, Jul 5, 2011 at 10:20
Excellent question:
db.mytable.myfield.default = request.args(0)
form = SQLFORM(db.mytable)
On Jan 4, 4:28 pm, Fabiano - deStilaDo fabianoeng...@gmail.com
wrote:
Hi,
I have a default value for a field defined on the table definition,
along with its validators.
I want to create a form with
17 matches
Mail list logo