app.shell_context_processor decorator does not register the function as a shell context function app.shell_context_processor decorator does not register the function as a shell context function flask flask

app.shell_context_processor decorator does not register the function as a shell context function


I told Flask how to import the application, by setting the FLASK_APP environment variable:

export FLASK_APP=microblog.py

It seems to make it !


I had the same issue. I had to re-export the FLASK_APP variable.


If you use CMD then: set FLASK_APP=microblog.py

If you use PowerShell then: $env:FLASK_APP = '.\microblog.py'

If you use Bash(Linux) then: export FLASK_APP=microblog.py

The problem is with the variable FLASK_APP