Currently I have a session variable called site_id;
Its a read only variable we set when the user comes to one of the sites;
ON the default register pages; I am trying to store this variable when
the user registers;
I am trying to figure out how to "extend" the default "register" command;
Basically what I am trying to do is store site_id into the databases
after a user registers;
In a separate table; I read that I can add fields to the default auth
table; I do not want to take this approach;
Theoretically there can be a many to one relationship;
I see this in the docs;
defregister():
form=SQLFORM
<http://web2py.com/book/default/docstring/SQLFORM>.factory(db.client,db.address)
ifform.accepts(request
<http://web2py.com/book/default/docstring/request>.vars):
id=db.client.insert(**db.client._filter_fields(form.vars))
form.vars.client=id
id=db.address.insert(**db.address._filter_fields(form.vars))
response
<http://web2py.com/book/default/docstring/response>.flash='Thanks for filling
the form'
returndict(form=form)
Also not sure why you use the ** in front of **db.address
Thanks.
Thanks.