sites_fixture.json
author Madhusudan.C.S <madhusudancs@gmail.com>
Tue, 18 Jan 2011 14:37:06 +0530
changeset 457 1082b5ee29c5
parent 405 76d13cdeefc7
permissions -rw-r--r--
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.

[{"pk": 1, "model": "sites.site", "fields": {"domain": "example.com", "name": "example.com"}}, {"pk": 3, "model": "sites.site", "fields": {"domain": "fossee.in/pytask", "name": "PyTask "}}, {"pk": 2, "model": "sites.site", "fields": {"domain": "localhost:8080", "name": "Development Server"}}]