hello,
I tried the code on bottom, where I changed the default auth_user table
name and I used the "auth.signature' feature, but I get an error:
‘*Cannot resolve reference auth_user in tests definition*’
this happen only when a table contain "auth.signature".
Debuggin a bit I found that when running the code (in authapi.py):
reference_user = 'reference %s' % settings.table_user_name
the value of variable settings.table_user_name is still “*auth_user*”, not “
*users*”.
I tried also to hardcode the value “*users*” in this way
reference_user = 'reference %s' % 'users'
and all is gone fine, but obv. is not the right solution...
the example code:
auth = Auth(db, host_names=configuration.get('host.names'))
auth.settings.table_user_name = 'users'
#auth.settings.extra_fields['users'] = []
auth.define_tables(username=False, signature=False)
db.define_table('tests',
Field('name', length=100,
requires=IS_NOT_EMPTY()),
auth.signature,
format='%(name)s',
)
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.