This is a project implementing the blog post by Mbithe Nzomo.
Prerequisites
-
Python 2.7
-
virtualenv
-
Mysql
$ brew update && brew install mysql
-
Flask
$ pip install Flask
Resources:
-
And might add some of the feature from The Flask Mega-Tutorial.
The following list is some of the features might be used for User Portal:
Known Problems
-
flask development mode WARNING
$ flask run * Serving Flask app "run.py" * Environment: production WARNING: Do not use the development server in a production environment. Use a production WSGI server instead. * Debug mode: off
Solution: Add environment variable
FLASK_ENV
and set it to development$ export FLASK_ENV=development
-
ValueError when click on Assign in employees admin page
file "APP_ROOT/venv/lib/python2.7/site-packages/wtforms/ext/sqlalchemy/fields.py", line 189, in get_pk_from_identity ValueError: too many values to unpack
Solution(for now): Modify line 189 in
fields.py
fromcls, key = identity_key(instance=obj)
to
cls, key = identity_key(instance=obj)[:2]