On Sunday, October 23, 2011 11:20:40 AM UTC-4, lucas wrote:
>
> yes, putting the requires under the field worked great, thanx.
>
> well, i tried to just change the natural/ordinal order of the columns/
> fields in the database (postgresql in my case) but that didn't work.
>
Right. The forms will be based on the web2py model (i.e., the DAL table
definition), not what's in the DB.
>
> how can i direct the register/profile of auth to another view and how
> do i customize that view?
>
Several options. The simplest is just to add some logic directly to the
existing user view:
{{if request.args(0) == 'register':}}
[custom register form code goes here]
{{pass}}
You can also create a separate register view and add logic to the user()
function to switch to that view:
def user():
if request.args(0) == 'register':
response.view = 'default/register.html'
return dict(form=auth())
Finally, you can define a completely separate register function:
def register():
return dict(form=auth.register())
As for creating a custom form,
see http://web2py.com/book/default/chapter/07#Custom-forms.
Anthony