Skip to content
Snippets Groups Projects
Commit ca89e2da authored by Daniel Myrén's avatar Daniel Myrén
Browse files

Update README.md

parent ddbfd576
No related branches found
No related tags found
No related merge requests found
...@@ -58,17 +58,12 @@ https://docs.sqlalchemy.org/en/20/changelog/migration_20.html#migration-20-query ...@@ -58,17 +58,12 @@ https://docs.sqlalchemy.org/en/20/changelog/migration_20.html#migration-20-query
```python ```python
# Create Flask app
app = Flask(__name__)
# Enable CSRF on all api endpoints app = Flask(__name__) # Create Flask app
csrf = CSRFProtect(app) db = SQLAlchemy() # Integrates SQLAlchemy with Flask.
csrf = CSRFProtect(app) # Enable CSRF
# Define Content Security Policies talisman = Talisman(app, content_security_policy=csp) # HTTP Security
talisman = Talisman(app, content_security_policy=csp) user_db = SQLAlchemyUserDatastore(db, User, Role) # Connect User tables
app.security = Security(app, user_db) # Initialize Flask-Security
# Initialize Flask-Security
user_datastore = SQLAlchemyUserDatastore(db, User, Role)
app.security = Security(app, user_datastore)
``` ```
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment