Domanda

I am using

    form1= auth.login()
    form2= auth.register()

to generate the login and register forms in web2py, but now i want to delete some of the fields from these forms, how can i modify these predefined forms and add email verification in register form? I tried defining new forms, but then i don’t want to loose functionality provided by predefined forms.

È stato utile?

Soluzione

Before:

 form1 = SQLFORM(....)

You can do

 db.auth_user.fieldname.writable = db.auth_user.fieldname.readable = False

You can also defined your own:

 db.define_table('auth_user', ....)

before you auth.define_tables() and your won table will be used.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top