You were missing a key. The following works on my machine. K
--- import requests login_url = "http://192.168.0.21/admin/login/" client = requests.session() client.get(login_url) csrftoken = client.cookies['csrftoken'] login_data = {'username':'jim', 'password':'beam', 'this_is_the_login_form':'1', 'csrfmiddlewaretoken':csrftoken} r = client.post(login_url, data=login_data) target_url = "http://192.168.0.21/admin/auth/user/" t = client.get(target_url) 'Select user to change' in t.text # True -- 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.

