When a user is not logged in and attempts to access the login page with debug mode enabled, the file "base.html" throws an exception claiming that "search_form" is not an attribute of the global "g" object. It appears this was being caused by "search_form" only being defined for "g" if the user is authenticated. Moved attribute declaration out of if clause. |
||
---|---|---|
app | ||
db_repository | ||
tmp | ||
.gitignore | ||
LICENSE | ||
Procfile | ||
README.md | ||
babel.cfg | ||
config.py | ||
db_create.py | ||
db_downgrade.py | ||
db_migrate.py | ||
db_upgrade.py | ||
killpython | ||
profile.py | ||
requirements.txt | ||
run.py | ||
runp-mysql.fcgi | ||
runp-sqlite.fcgi | ||
runp.py | ||
tests.py | ||
tr_compile.py | ||
tr_init.py | ||
tr_update.py |
README.md
microblog
A decently featured microblogging web application written in Python and Flask that I'm developing in my Flask Mega-Tutorial series that begins here.
Installation
The tutorial referenced above explains how to setup a virtual environment with all the required modules.
The sqlite database must also be created before the application can run, and the db_create.py
script takes care of that. See the Database tutorial for the details.
Running
To run the application in the development web server just execute run.py
with the Python interpreter from the flask virtual environment.