Can you show the entire traceback?
Do you get error even if
auth.settings.create_user_groups=True?
If you use appadmin, do you see the auth_group?



On Jul 16, 4:29 pm, FERNANDO VILLARROEL <[email protected]> wrote:
> Dear all.
>
> I am trying to use authentication:
>
> http://www.web2py.com/examples/default/tools
>
> I have the following code on my db.py:
>
> from gluon.tools import *
> auth=Auth(globals(),db)            # authentication/authorization
>
> # define custom tables (table_user_name is 'auth_user')
> auth.settings.table_user = db.define_table(auth.settings.table_user_name,
>     db.Field('first_name', length=128,default=''),
>     db.Field('last_name', length=128,default=''),
>     db.Field('email', length=128,default='', requires = [IS_EMAIL(), 
> IS_NOT_IN_DB(db,'%s.email'%auth.settings.table_user_name)]),
>     db.Field('password', 'password', readable=False, label='Password', 
> requires=CRYPT()),
>     db.Field('registration_key', length=128, writable=False, 
> readable=False,default=''),migrate=False)
>
> auth.define_tables()                # creates all needed tables
> auth.settings.create_user_groups=False
>
> But the application return the next exception:
>
>   self._db._execute(query)
>   File "/home/fvillarroel/web2py/gluon/sql.py", line 726, in <lambda>
>     self._execute = lambda *a, **b: self._cursor.execute(*a, **b)
> ProgrammingError: no existe la relación «auth_group»
>
> What is the struct of the table auth_group?
>
> what i am doing wrong?
>
> Any idea or how i can solved the problem.
>
> Fernando
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to