Fixed in trunk but you should not use Auth without auth.define_tables() (that is really causing the problem).
On Thursday, 30 August 2012 09:19:54 UTC-5, Jonathan Lundell wrote: > > On 30 Aug 2012, at 1:24 AM, Annet <[email protected] <javascript:>> > 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: > > > Versionweb2py™(2, 0, 2, datetime.datetime(2012, 8, 30, 4, 8, 18), > 'stable')PythonPython 2.6.1: /usr/bin/python2.6Traceback > > 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" > <http://127.0.0.1:8000/admin/default/edit/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. > --

