Ok, I've gotten further. I have confirmed the problem was related to the csrf token. This is my new code:
client = requests.session() # Retrieve the CSRF token first client.get(URL) # sets the cookie csrftoken = client.cookies['csrftoken'] login_data = dict(Username='jim', Password='beam, csrfmiddlewaretoken=csrftoken) r = client.post(URL, data=login_data) Now, I get a 200 for the status code, but it still doesn't actually login.......... -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-users. For more options, visit https://groups.google.com/groups/opt_out.

