docs: make code snippet usable with required imports (#16473)

This commit is contained in:
Ke Zhu
2021-08-26 18:16:30 -04:00
committed by GitHub
parent f422f1ea49
commit fd6456186d

View File

@@ -207,7 +207,11 @@ CUSTOM_SECURITY_MANAGER = CustomSsoSecurityManager
the app object and can alter it in any way. For example, add `FLASK_APP_MUTATOR` into your
`superset_config.py` to setup session cookie expiration time to 24 hours:
```
```python
from flask import session
from flask import Flask
def make_session_permanent():
'''
Enable maxAge for the cookie 'session'