User Management Service
A simple user management service (UMS) written in Python & Django with the following requirements:
- user login via email and password
- user registration via email, password & name and following redirection to a welcome page
- activation email on successful registration (currently only in console)
- user settings page where the user can change its password, subscribe/unsubscribe for a site newsletter and the current user status (active/inactive) is shown
- user logout
- email addresses have to be unique
- password length at least 5 characters and should contain at least one number inside
- supported in FF, Chrome and IE8
- renders in mobile browser (tested on Android device)
The UMS was tested on two environments:
- Ubuntu 12.04 LTS with Python 2.7.3
- Windows 7 with Python 2.7.2
Additionally it is required that the virtualenv library is installed in order to seperate the environment from the system enviroment and to use the build scripts.
The example UMS is using the following python packages (the build script will handle the installation):
- django 1.4
- django-registration 0.8
2. Installation & Setup
Clone the repository or extract the tarball. Open a terminal/command prompt in the directory the files where cloned to and type.
You can also execute the following steps manually.
virtualenv test_ums_env source test_ums_env/bin/activate pip install -r requirements.txt cd test_ums python manage.py syncdb --noinput python manage.py runserver 8080
virtualenv test_ums_env test_ums_env/Scripts/activate pip install -r requirements.txt cd test_ums python manage.py syncdb --noinput python manage.py runserver 8080
After that the application is available in your web browser via http://localhost:8080.
3. Implementation details
Django's authentification system up to version 1.4 is working
with usernames instead of emails to login a user by default. In order
to make it work to use email addresses instead a custom backend
was created for django.contrib.auth and django-registration. These
also include forms, which overwrite the default forms used by these
two. The overwritten parts can be found in
Except this a Django application called
is used to handle the settings and welcome pages and also provide some
basic glue and workflow for the whole project.
Templates are hosted in
test_ums/templates/ and static files are hosted
test_ums/static/ (currently only CSS files).
For simplification the user data is saved in an sqlite3 database within the django project directory.