On 30 Aug 2012, at 1:24 AM, Annet <[email protected]> wrote: > In web2py 2.0.2 in an application in which I commented out: > > # auth.define_tables(username=False, signature=False) > > I defined a new table, after saving db.py, when I click the database > administration button I get the following error: > > > Version > > web2py™ (2, 0, 2, datetime.datetime(2012, 8, 30, 4, 8, 18), 'stable') > Python Python 2.6.1: /usr/bin/python2.6 > Traceback > > 1. > 2. > 3. > 4. > 5. > 6. > 7. > 8. > 9. > Traceback (most recent call last): > File "/Library/Python/2.6/site-packages/web2py/gluon/restricted.py", line > 209, in restricted > exec ccode in environment > File > "/Library/Python/2.6/site-packages/web2py/applications/init/views/appadmin.html", > line 53, in <module> > {{=form}} > File "/Library/Python/2.6/site-packages/web2py/gluon/tools.py", line 1260, > in navbar > if self.use_username and \ > AttributeError: 'Auth' object has no attribute 'use_username' >
A workaround: set auth.use_username to True or False depending on whether you're using a 'username' field in your auth user table. I suppose that Auth.__init__ ought to provide a default False value. --

