Fix bug in format suffix patterns

This commit is contained in:
Tom Christie 2012-10-05 15:37:50 +01:00
parent 9ac6fcf19c
commit 272fddc952
2 changed files with 1 additions and 2 deletions

View File

@ -59,7 +59,6 @@ Note that the base URL can be whatever you want, but you must include `rest_fram
## Quickstart ## Quickstart
## Tutorial ## Tutorial
The tutorial will walk you through the building blocks that make up REST framework. It'll take a little while to get through, but it'll give you a comprehensive understanding of how everything fits together, and is highly recommended reading. The tutorial will walk you through the building blocks that make up REST framework. It'll take a little while to get through, but it'll give you a comprehensive understanding of how everything fits together, and is highly recommended reading.

View File

@ -8,7 +8,7 @@ def format_suffix_patterns(urlpatterns, suffix_required=False, suffix_kwarg=None
include a '.format' suffix. Retains urlpattern ordering. include a '.format' suffix. Retains urlpattern ordering.
""" """
suffix_kwarg = suffix_kwarg or api_settings.FORMAT_SUFFIX_KWARG suffix_kwarg = suffix_kwarg or api_settings.FORMAT_SUFFIX_KWARG
suffix_pattern = '.(?P<%s>[a-z]+)$' % suffix_kwarg suffix_pattern = '\.(?P<%s>[a-z]+)$' % suffix_kwarg
ret = [] ret = []
for urlpattern in urlpatterns: for urlpattern in urlpatterns: