Created
August 26, 2014 08:48
-
-
Save mekanix/c088543eb3f223b4b64e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
$('#login').click(function() { | |
$.post( | |
"/", | |
{ | |
username: $("#id_username").val(), | |
password: $("#id_password").val(), | |
csrfmiddlewaretoken: $.cookie("csrftoken"), | |
next: $("#id_next").val() | |
}, | |
function() { | |
window.location.replace("/"); | |
} | |
) | |
.fail(function(response, status) { | |
alert("Status: " + status + "\nResponse: " + response); | |
}) | |
; | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment