Python flask_wtf.csrf.CsrfProtect() Examples
The following are 1
code examples of flask_wtf.csrf.CsrfProtect().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
flask_wtf.csrf
, or try the search function
.
Example #1
Source File: __init__.py From online-ratings with MIT License | 5 votes |
def get_app(config): app = Flask(__name__) app.config.from_object(config) mail.init_app(app) RQ(app) csrf = CsrfProtect(app) csrf.exempt(api_1_0_blueprint) stream_handler = logging.StreamHandler() app.logger.setLevel(logging.DEBUG) app.logger.addHandler(stream_handler) db.init_app(app) Migrate(app, db) bootstrap = Bootstrap(app) security = Security(app, user_datastore) user_registered.connect(user_registered_sighandler) app.register_blueprint(ratings_blueprint) app.register_blueprint(api_1_0_blueprint, url_prefix='/api/v1') app.register_blueprint(verify_blueprint, url_prefix='/v') app.register_blueprint(tournament_blueprint, url_prefix='/tournament') app.register_error_handler(500, email_exception) return app