> I suspect we have a major problem here: > > "role" is a keyword in postgresql and I did not know about > it. To > check if this is the problem: > > 1) remove the database > 2) remove everything in databases/* > 3) create the database again > 4) go to appadmin and tell me which tables you see
Done i see the following tables: db.tarifa db.clientes db.accountcode db.pagos db.proveedor db.rutaproveedor db.webuser db.auth_user db.auth_group db.auth_membership db.auth_permission db.auth_event > Once we have identified the problem, we'll find a > solution. > > Massimo > > > On Jul 16, 9:49 pm, FERNANDO VILLARROEL <[email protected]> > wrote: > > Hello, > > > > I am using a database Postgres. > > > > > Can you show the entire traceback? > > > > Traceback (most recent call last): > > File > "/home/fvillarroel/web2py/gluon/restricted.py", line 107, in > restricted > > exec ccode in environment > > File > "/home/fvillarroel/web2py/applications/clientes/controllers/default.py", > line 53, in <module> > > File "/home/fvillarroel/web2py/gluon/globals.py", > line 80, in <lambda> > > self._caller = lambda f: f() > > File > "/home/fvillarroel/web2py/applications/clientes/controllers/default.py", > line 32, in user > > return dict(form=auth()) > > File "/home/fvillarroel/web2py/gluon/tools.py", > line 436, in __call__ > > return self.register() > > File "/home/fvillarroel/web2py/gluon/tools.py", > line 745, in register > > group_id = self.add_group("user_%s" % > form.vars.id, description) > > File "/home/fvillarroel/web2py/gluon/tools.py", > line 1211, in add_group > > description=description) > > File "/home/fvillarroel/web2py/gluon/sql.py", line > 1377, in insert > > 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» > > > > > Do you get error even if > > > auth.settings.create_user_groups=True? > > > > yes > > > > > If you use appadmin, do you see the auth_group? > > > > No > > appadmin is the front end for administrator? > > > > > > > > > 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 -~----------~----~----~----~------~----~------~--~---

