Loading AUTHORS +2 −1 Original line number Diff line number Diff line Loading @@ -136,9 +136,10 @@ answer newbie questions, and generally made Django that much better: Robert Coup Pete Crosier <pete.crosier@gmail.com> Matt Croydon <http://www.postneo.com/> Jure Cuhalev <gandalf@owca.info> Leah Culver <leah.culver@gmail.com> Raúl Cumplido <raulcumplido@gmail.com> flavio.curella@gmail.com Jure Cuhalev <gandalf@owca.info> John D'Agostino <john.dagostino@gmail.com> dackze+django@gmail.com Jim Dalton <jim.dalton@gmail.com> Loading docs/topics/testing.txt +16 −5 Original line number Diff line number Diff line Loading @@ -650,8 +650,6 @@ Note a few important things about how the test client works: * By default, the test client will disable any CSRF checks performed by your site. .. versionadded:: 1.2.2 If, for some reason, you *want* the test client to perform CSRF checks, you can create an instance of the test client that enforces CSRF checks. To do this, pass in the Loading @@ -664,10 +662,23 @@ Note a few important things about how the test client works: Making requests ~~~~~~~~~~~~~~~ Use the ``django.test.client.Client`` class to make requests. It requires no arguments at time of construction: Use the ``django.test.client.Client`` class to make requests. .. class:: Client(enforce_csrf_checks=False, **defaults) It requires no arguments at time of construction. However, you can use keywords arguments to specify some default headers. For example, this will send a ``User-Agent`` HTTP header in each request:: >>> c = Client(HTTP_USER_AGENT='Mozilla/5.0') The values from the ``extra`` keywords arguments passed to :meth:`~django.test.client.Client.get()`, :meth:`~django.test.client.Client.post()`, etc. have precedence over the defaults passed to the class constructor. .. class:: Client() The ``enforce_csrf_checks`` argument can be used to test CSRF protection (see above). Once you have a ``Client`` instance, you can call any of the following methods: Loading Loading
AUTHORS +2 −1 Original line number Diff line number Diff line Loading @@ -136,9 +136,10 @@ answer newbie questions, and generally made Django that much better: Robert Coup Pete Crosier <pete.crosier@gmail.com> Matt Croydon <http://www.postneo.com/> Jure Cuhalev <gandalf@owca.info> Leah Culver <leah.culver@gmail.com> Raúl Cumplido <raulcumplido@gmail.com> flavio.curella@gmail.com Jure Cuhalev <gandalf@owca.info> John D'Agostino <john.dagostino@gmail.com> dackze+django@gmail.com Jim Dalton <jim.dalton@gmail.com> Loading
docs/topics/testing.txt +16 −5 Original line number Diff line number Diff line Loading @@ -650,8 +650,6 @@ Note a few important things about how the test client works: * By default, the test client will disable any CSRF checks performed by your site. .. versionadded:: 1.2.2 If, for some reason, you *want* the test client to perform CSRF checks, you can create an instance of the test client that enforces CSRF checks. To do this, pass in the Loading @@ -664,10 +662,23 @@ Note a few important things about how the test client works: Making requests ~~~~~~~~~~~~~~~ Use the ``django.test.client.Client`` class to make requests. It requires no arguments at time of construction: Use the ``django.test.client.Client`` class to make requests. .. class:: Client(enforce_csrf_checks=False, **defaults) It requires no arguments at time of construction. However, you can use keywords arguments to specify some default headers. For example, this will send a ``User-Agent`` HTTP header in each request:: >>> c = Client(HTTP_USER_AGENT='Mozilla/5.0') The values from the ``extra`` keywords arguments passed to :meth:`~django.test.client.Client.get()`, :meth:`~django.test.client.Client.post()`, etc. have precedence over the defaults passed to the class constructor. .. class:: Client() The ``enforce_csrf_checks`` argument can be used to test CSRF protection (see above). Once you have a ``Client`` instance, you can call any of the following methods: Loading