jeudi 2 avril 2015

django test client gets 404, but browser works

I am able to reach a local address through my web browser (http://ift.tt/1CPvmj9) to see the Solr Admin (search webapp).


However, through the Django (1.7) test client I get:




>>> from django.test import Client
>>> c = Client()
>>> response = c.get('http://ift.tt/1CPvmj9')
>>> response.status_code
404


Why can't Django connect to the same address(es) as my browser?


Aucun commentaire:

Enregistrer un commentaire