mirror of
https://github.com/wassname/flask-security.git
synced 2026-07-23 12:50:33 +08:00
Fix doc string
This commit is contained in:
@@ -14,7 +14,8 @@ from flask.ext.security import UserMixin, RoleMixin
|
||||
from flask.ext.security.datastore import UserDatastore
|
||||
|
||||
class MongoEngineUserDatastore(UserDatastore):
|
||||
"""A MongoEngine datastore implementation for Flask-Security. Example:
|
||||
"""A MongoEngine datastore implementation for Flask-Security.
|
||||
Example usage::
|
||||
|
||||
from flask import Flask
|
||||
from flask.ext.mongoengine import MongoEngine
|
||||
@@ -26,7 +27,7 @@ class MongoEngineUserDatastore(UserDatastore):
|
||||
app.config['MONGODB_DB'] = 'flask_security_example'
|
||||
app.config['MONGODB_HOST'] = 'localhost'
|
||||
app.config['MONGODB_PORT'] = 27017
|
||||
|
||||
|
||||
db = MongoEngine(app)
|
||||
Security(app, MongoEngineUserDatastore(db))
|
||||
"""
|
||||
|
||||
@@ -14,7 +14,8 @@ from flask.ext.security import UserMixin, RoleMixin
|
||||
from flask.ext.security.datastore import UserDatastore
|
||||
|
||||
class SQLAlchemyUserDatastore(UserDatastore):
|
||||
"""A SQLAlchemy datastore implementation for Flask-Security. Example:
|
||||
"""A SQLAlchemy datastore implementation for Flask-Security.
|
||||
Example usage::
|
||||
|
||||
from flask import Flask
|
||||
from flask.ext.security import Security
|
||||
@@ -24,7 +25,7 @@ class SQLAlchemyUserDatastore(UserDatastore):
|
||||
app = Flask(__name__)
|
||||
app.config['SECRET_KEY'] = 'secret'
|
||||
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/flask_security_example.sqlite'
|
||||
|
||||
|
||||
db = SQLAlchemy(app)
|
||||
Security(app, SQLAlchemyUserDatastore(db))
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user