boundsj/graftermap — pull request #1 by boundsj (2012-06-13 05:56:28+00:00)
Title: Mongodb backed user login

The following major changes were done in this pull request:

1) Moderate code cleanup and organization (no major refactoring)
2) User login, User model is now backed by mongodb
3) Integration of mongokit for interatin with mongodb
4) User verification of password in db (stored passwords are salted / hashed)
5) Comprehensive tests for all user / login (with mongo backed user model) functionality

The key tests that document the new functionality are in test.py:

test_that_user_can_be_created()
test_get_user_by_name()
test_add_tree_logged_in_works()

The application flow for the mongodb backed user / login functionality is:

1) User requests /login page (application/__init__./login())
(if POST)
2a) Posted username and password are verified in login() function
3a) If verified, user is logged in using flaskext.login utils (http://packages.python.org/Flask-Login/)
4a) If any issue with unknown user or password, the login attempt fails
(if GET)
2b) Login form is rendered