From 20189ff4a405dbf52e36629f30cd50ab17c0aad8 Mon Sep 17 00:00:00 2001
From: Bo-Chun Louis Chen <louistw@uab.edu>
Date: Thu, 24 May 2018 15:00:38 -0500
Subject: [PATCH] Added two known problems in README

---
 README.md | 42 ++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 40 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index 5bece3e..c434544 100644
--- a/README.md
+++ b/README.md
@@ -23,8 +23,8 @@ This is a project implementing the blog post by Mbithe Nzomo.
 - [Part two](https://scotch.io/tutorials/build-a-crud-web-app-with-python-and-flask-part-two)
 - [Part three](https://scotch.io/tutorials/build-a-crud-web-app-with-python-and-flask-part-three)
 
-And might add some of the feature from [The Flask Mega-Tutorial](https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world).  
-The following list is some of the features might be used for User Portal:
+	And might add some of the feature from [The Flask Mega-Tutorial](https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world).  
+	The following list is some of the features might be used for User Portal:
 
 - [Chapter 2: Templates](https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-ii-templates)
 - [Chapter 10: Email Support](https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-x-email-support)
@@ -32,3 +32,41 @@ The following list is some of the features might be used for User Portal:
 - [Chapter 19: Deployment on Docker Containers](https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-xix-deployment-on-docker-containers)
 - [Chapter 22: Background Jobs](https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-xxii-background-jobs)
 - [Chapter 23: APIs](https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-xxiii-application-programming-interfaces-apis)
+
+-----
+### Known Problems
+1. flask development mode WARNING
+
+	```shell
+	$ 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
+
+	```shell
+	$ export FLASK_ENV=development
+	```
+
+2. ValueError when click on Assign in employees admin page
+
+	```shell
+	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` from
+
+	```shell
+	cls, key = identity_key(instance=obj)
+	```
+	to
+	```shell
+	cls, key = identity_key(instance=obj)[:2]
+	```
-- 
GitLab