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"
 <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'

 Error snapshot [image: help]  

<type 'exceptions.AttributeError'>('Auth' object has no attribute 
'use_username') 

inspect attributes 
 Frames 
   
   -  
   
   *File /Library/Python/2.6/site-packages/web2py/gluon/restricted.py in 
   restricted at line 209* code arguments variables 
    -  
   
   *File 
   
/Library/Python/2.6/site-packages/web2py/applications/init/views/appadmin.html 
   in <module> at line 53* code arguments variables 
    -  
   
   *File /Library/Python/2.6/site-packages/web2py/gluon/tools.py in navbar 
   at line 1260* code arguments variables 
    Function argument list 
   
   (self=<gluon.tools.Auth object at 0x15b056f0>, prefix='Welcome ', 
   action='/init/default/user', separators=(' [ ', ' | ', ' ] '), 
   user_identifier=<function <lambda> at 0x159e2170>, 
   referrer_actions=<function <lambda> at 0x159e2170>)
    Code listing 
   
   1255.
   1256.
   1257.
   1258.
   1259.
   1260.
   
   1261.
   1262.
   1263.
   1264.
   
               bar = SPAN(s1, login, s3, _class='auth_navbar')
   
               if not 'register' in self.settings.actions_disabled:
                   bar.insert(-1, s2)
                   bar.insert(-1, register)
               if self.use_username and \
   
                       not 'retrieve_username' in 
self.settings.actions_disabled:
                   bar.insert(-1, s2)
                   bar.insert(-1, retrieve_username)
               if not 'request_reset_password' in 
self.settings.actions_disabled:
   
    Variables  self.use_username undefined  self <gluon.tools.Auth object 
   at 0x15b056f0>  self.settings.actions_disabled []  self.settings <Storage 
   {'showid': False, 'verify_email_onaccep...'retrieve_username_next': 
   '/init/default/index'}>
   

Kind regards,

Annet

-- 



Reply via email to