diff options
| author | Tom Christie | 2013-07-04 05:50:04 -0700 |
|---|---|---|
| committer | Tom Christie | 2013-07-04 05:50:04 -0700 |
| commit | 99794773cf6b865b5b860b35db31dea92968c605 (patch) | |
| tree | 157b09d6b19ee5583d6d32123b3671c1c75adbc9 /docs/api-guide/settings.md | |
| parent | a890116ab31e57af3bd1382c1f17259fa368f988 (diff) | |
| parent | 7398464b397d37dbcfda13eb6142039fed3e9a19 (diff) | |
| download | django-rest-framework-99794773cf6b865b5b860b35db31dea92968c605.tar.bz2 | |
Merge pull request #962 from tomchristie/test-client
APIClient and APIRequestFactory
Diffstat (limited to 'docs/api-guide/settings.md')
| -rw-r--r-- | docs/api-guide/settings.md | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/docs/api-guide/settings.md b/docs/api-guide/settings.md index 4a5164c9..7b114983 100644 --- a/docs/api-guide/settings.md +++ b/docs/api-guide/settings.md @@ -149,6 +149,33 @@ Default: `None` --- +## Test settings + +*The following settings control the behavior of APIRequestFactory and APIClient* + +#### TEST_REQUEST_DEFAULT_FORMAT + +The default format that should be used when making test requests. + +This should match up with the format of one of the renderer classes in the `TEST_REQUEST_RENDERER_CLASSES` setting. + +Default: `'multipart'` + +#### TEST_REQUEST_RENDERER_CLASSES + +The renderer classes that are supported when building test requests. + +The format of any of these renderer classes may be used when contructing a test request, for example: `client.post('/users', {'username': 'jamie'}, format='json')` + +Default: + + ( + 'rest_framework.renderers.MultiPartRenderer', + 'rest_framework.renderers.JSONRenderer' + ) + +--- + ## Browser overrides *The following settings provide URL or form-based overrides of the default browser behavior.* |
