diff options
| author | Tom Christie | 2015-01-05 11:02:28 +0000 | 
|---|---|---|
| committer | Tom Christie | 2015-01-05 11:02:28 +0000 | 
| commit | 6168f60ba80a84768172437c09957c1fab05f014 (patch) | |
| tree | 4922399b5996d6cd0fdeb4aad2fbb99698f3a1c8 /docs/api-guide/format-suffixes.md | |
| parent | 889a0bdeca942995ab32bf19c3d9fdbfaeec58ec (diff) | |
| parent | 8cf37449715c32c4a692667814466c7f32e8734f (diff) | |
| download | django-rest-framework-6168f60ba80a84768172437c09957c1fab05f014.tar.bz2 | |
Merge branch 'master' into version-3.1
Diffstat (limited to 'docs/api-guide/format-suffixes.md')
| -rw-r--r-- | docs/api-guide/format-suffixes.md | 12 | 
1 files changed, 12 insertions, 0 deletions
| diff --git a/docs/api-guide/format-suffixes.md b/docs/api-guide/format-suffixes.md index 20c1e995..35dbcd39 100644 --- a/docs/api-guide/format-suffixes.md +++ b/docs/api-guide/format-suffixes.md @@ -55,6 +55,18 @@ The name of the kwarg used may be modified by using the `FORMAT_SUFFIX_KWARG` se  Also note that `format_suffix_patterns` does not support descending into `include` URL patterns. +### Using with `i18n_patterns` + +If using the `i18n_patterns` function provided by Django, as well as `format_suffix_patterns` you should make sure that the `i18n_patterns` function is applied as the final, or outermost function. For example: + +    url patterns = [ +        … +    ] + +    urlpatterns = i18n_patterns( +        format_suffix_patterns(urlpatterns, allowed=['json', 'html']) +    ) +  ---  ## Accept headers vs. format suffixes | 
