diff options
author | Roberto Hueso Gómez <rhueso@soleta.eu> | 2020-09-04 11:09:44 +0200 |
---|---|---|
committer | Roberto Hueso Gómez <rhueso@soleta.eu> | 2020-09-04 11:09:44 +0200 |
commit | d5eaf699a7dd5215403b626762b68cd09bc846b5 (patch) | |
tree | 53cd84e4cde844350a55278ade8b2daade44e40e /ogcp/__init__.py | |
parent | 73a6e07b83b76f9677494502bc6e32a7bf48cfd7 (diff) |
Add WoL action
This action can be applied on one or multiple scopes. This
implementation use Flask-WTF as a way to build and valdiate forms. As a
side effect, this adds CSRF protection to all forms.
Diffstat (limited to 'ogcp/__init__.py')
-rw-r--r-- | ogcp/__init__.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ogcp/__init__.py b/ogcp/__init__.py index 1fda3f1..58ba0c3 100644 --- a/ogcp/__init__.py +++ b/ogcp/__init__.py @@ -1,6 +1,14 @@ +from flask_wtf.csrf import CSRFProtect +from flask_bootstrap import Bootstrap from flask_babel import Babel from flask import Flask +from os import urandom + app = Flask(__name__) babel = Babel(app) +csrf = CSRFProtect(app) +bootstrap = Bootstrap(app) + +app.secret_key = urandom(16) import ogcp.views |