A show case of model driven developmet of web applications.
Please checkout this document to run the application in developer’s environment.
- we do not need to check for
GET
andPOST
in request handlers that have only one method registered on them. eg:api.org:588
atshow_users()
- We need to check for existence of keys in request handlers, and not
simply dereference the dictionary. eg:
show_users()
We cannot create an admin user with add_user
.
Hence, remove the role
parameter from the add_user
API.
make role = "user"
by default.
Remove role
as a parameter from the REST API. Change add_user
in system interface to set role = "user"
by default.
wrong API usage / wrong user input should not result in
4xx
or 5xx
errors.
Rather, they should return a json object along the lines of
{
status: "success" / "failure",
[error_message: "error_string"]
[other components on success]
}
- Errors will have
"failure"
and an associated error message - Success with have
"success"
and other associated data
urllib2.URLError URLError: <urlopen error [Errno -2] Name or service not known>
If such an error occurs when authentication using google oauth, install nscd - reference
apt-get install nscd