From 5df01af720e5c4b98a9fec10e3e851842e665542 Mon Sep 17 00:00:00 2001 From: Matt Wright Date: Thu, 26 Apr 2012 11:20:34 -0300 Subject: [PATCH] Fix bad code example --- docs/index.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index e4607d4..0ea0acb 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -94,14 +94,14 @@ First thing you'll want to do is setup your application and datastore:: db = SQLAlchemy(app) Security(app, SQLAlchemyUserDatastore(db)) -You'll probably want to at least one user to the database to test this out, so -you can add something such as the following to quickly add an initial user:: +You'll probably want to at least one user to the database to test this out. +There are many ways to do this, but this is a quick and dirty way to do it:: @app.before_first_request def before_first_request(): user_datastore.create_role(name='admin') user_datastore.create_user(username='matt', email='matt@something.com', - password='password', roles['admin']) + password='password', roles=['admin']) Next you'll want to setup your login screen. Setup your view::