Dear All ,
i am making an E-learning application and am using
auth.user.first_name but when i logout an error happens :
<type 'exceptions.AttributeError'>('NoneType' object has no attribute
'first_name')
this is the controller :
def index():
"""
example action using the internationalization operator T and flash
rendered by views/default/index.html or views/generic.html
"""
meterials=db().select(db.addmaterial.ALL)
metforteacher=db(db.addmaterial.techer==auth.user.first_name).select(db.addmaterial.ALL)
return dict(meterials=meterials,metforteacher=metforteacher)
what is happening ??