1.2.2 Administering The Auth Environment

The web.auth module requires a suitable environment in which to store the auth information. This can either be a database or a directory depending on the storage driver being used.

If you choose to use the file driver, all you need is a directory in which the python program accessing the directory has read and write permissions.

If you choose to use the database storage driver you will need to set up the appropriate database tables. This is done using the auth setup() function as shown below:

authManager = web.auth.setup(storage='database', cursor=cursor)
errors = authManager.createTables() 
if errors:
    print '\n'.join(errors)
else:
    print "All done!"

Similarly, to drop that auth tables you can use authManager.dropTables().


Subsections
See About this document... for information on suggesting changes.