Handle all cases of login.
Firstly refactor the code to move all the post login mechanisms to a
function of its own.
Then add support to redirect the user if the login was attempted from
logout page.
Finally if the post response we got contains html, it is not a valid
JSON, which means the login failed. In this case catch the exception
and show the login error.
[buildout]
parts = django tagging django-robots south registration
eggs =
PIL
psycopg2
[django]
recipe = djangorecipe
version = 1.2.4
project = pytask
settings = settings
eggs =
${buildout:eggs}
pythonpath =
${tagging:location}
${django-robots:location}
${south:location}
${registration:location}
[tagging]
recipe = infrae.subversion
urls = http://django-tagging.googlecode.com/svn/trunk/ .
[django-robots]
recipe = mercurialrecipe
repository = https://bitbucket.org/jezdez/django-robots/
[south]
recipe = mercurialrecipe
repository = https://bitbucket.org/andrewgodwin/south/
[registration]
recipe = mercurialrecipe
repository = https://bitbucket.org/ubernostrum/django-registration/