did not get it: mdipie...@cs.depaul.edu

On Jul 1, 10:47 am, Rob Scheibel <robschei...@gmail.com> wrote:
> Emailed. Thanks for looking at it for me!
>
> -rob
>
> On Jul 1, 9:45 am, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > can you please email me your db.py?
>
> > On Jul 1, 5:12 am, Rob Scheibel <robschei...@gmail.com> wrote:
>
> > > Thanks for the quick reply! I added the line
> > > "auth.settings.table_user=db.siteuser" and I'm still getting the same
> > > error. Here's the traceback:
>
> > > Traceback (most recent call last):
> > >   File "/home/rob/Desktop/web2py/gluon/restricted.py", line 107, in
> > > restricted
> > >     exec ccode in environment
> > >   File "/home/rob/Desktop/web2py/applications/test/models/db.py", line
> > > 87, in <module>
> > >     auth.define_tables()               # creates all needed tables
> > >   File "/home/rob/Desktop/web2py/gluon/tools.py", line 528, in
> > > define_tables
> > >     migrate=self.__get_migrate(self.settings.table_membership_name,
> > > migrate))
> > >   File "/home/rob/Desktop/web2py/gluon/sql.py", line 989, in
> > > define_table
> > >     query = t._create(migrate=migrate)
> > >   File "/home/rob/Desktop/web2py/gluon/sql.py", line 1341, in _create
> > >     sql_fields_aux, logfile)
> > >   File "/home/rob/Desktop/web2py/gluon/sql.py", line 1389, in _migrate
> > >     self._db._execute(sub_query)
> > >   File "/home/rob/Desktop/web2py/gluon/sql.py", line 761, in <lambda>
> > >     self._execute = lambda *a, **b: self._cursor.execute(*a, **b)
> > > ProgrammingError: relation "siteuser" does not exist
>
> > > Line #87 in db.py is: auth.define_tables()
>
> > > -rob
>
> > > On Jun 30, 5:53 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > > > Try this:
>
> > > > db.define_table(
> > > >     "siteuser",
> > > >     db.Field('user_id'),
> > > >     db.Field('user_id__tmp'),
> > > >     db.Field('firstname', length=128, default=''),
> > > >     db.Field('lastname', length=128, default=''),
> > > >     db.Field('email', length=128, default='', requires = [IS_EMAIL(),
> > > > IS_NOT_IN_DB(db,'siteuser.email')]),
> > > >     db.Field('password', 'password', readable=False, label='Password',
> > > > requires=CRYPT()),
> > > >     db.Field('registration_key', length=128, writable=False,
> > > > readable=False,default=''),
> > > >     db.Field('last_logged_in', type='datetime', default='now'),
> > > >     db.Field('last_logged_in_from', length=36, default=''),
> > > >     db.Field('created_on', type='datetime', default='now'),
> > > >     db.Field('active', type='boolean', default=True)
> > > >     )
>
> > > > auth=Auth(globals(),db)            # authentication/authorization
> > > > auth.settings.table_user_name = 'siteuser'
> > > > auth.settings.table_user=db.siteuser  ### this was missing
> > > > auth.define_tables()               # creates all needed tables
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to