From 272fddc9526f09e4904af7c282edd003b12be55a Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Fri, 5 Oct 2012 15:37:50 +0100 Subject: Fix bug in format suffix patterns --- docs/index.md | 1 - rest_framework/urlpatterns.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/index.md b/docs/index.md index 9ec25025..b51963c3 100644 --- a/docs/index.md +++ b/docs/index.md @@ -59,7 +59,6 @@ Note that the base URL can be whatever you want, but you must include `rest_fram ## Quickstart - ## 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. diff --git a/rest_framework/urlpatterns.py b/rest_framework/urlpatterns.py index 7d09651a..7640f45d 100644 --- a/rest_framework/urlpatterns.py +++ b/rest_framework/urlpatterns.py @@ -8,7 +8,7 @@ def format_suffix_patterns(urlpatterns, suffix_required=False, suffix_kwarg=None include a '.format' suffix. Retains urlpattern ordering. """ 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 = [] for urlpattern in urlpatterns: -- cgit v1.2.3