Coverage for rest_framework/urlpatterns : + 87% +
+
+ From 3d4bb4b5533fa281c2f11c12ceb0a9ae61aa0d54 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Fri, 21 Jun 2013 22:03:07 +0100 Subject: Ensure action kwargs properly handdled. Refs #940. --- htmlcov/rest_framework_urlpatterns.html | 205 ++++++++++++++++++++++++++++++++ 1 file changed, 205 insertions(+) create mode 100644 htmlcov/rest_framework_urlpatterns.html (limited to 'htmlcov/rest_framework_urlpatterns.html') diff --git a/htmlcov/rest_framework_urlpatterns.html b/htmlcov/rest_framework_urlpatterns.html new file mode 100644 index 00000000..4c824a77 --- /dev/null +++ b/htmlcov/rest_framework_urlpatterns.html @@ -0,0 +1,205 @@ + + +
+ + + + +
+
+Hot-keys on this page
++ r + m + x + p toggle line displays +
++ j + k next/prev highlighted chunk +
++ 0 (zero) top of page +
++ 1 (one) first highlighted chunk +
+| + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | +
+
+
+
+
+ + + + + + + # Set of included URL patterns + + + + +# Add in the included patterns, after applying the suffixes + +suffix_pattern, +suffix_required) + ++ else: +# Regular URL pattern + + + + +# Add in both the existing and the new urlpattern + + + ++ + + + + """ +Supplement existing urlpatterns with corresponding patterns that also +include a '.format' suffix. Retains urlpattern ordering. ++ urlpatterns: +A list of URL patterns. ++ suffix_required: +If `True`, only suffixed URLs will be generated, and non-suffixed +URLs will not be used. Defaults to `False`. ++ allowed: +An optional tuple/list of allowed suffixes. eg ['json', 'api'] +Defaults to `None`, which allows any suffix. +""" + + +if len(allowed) == 1: +allowed_pattern = allowed[0] +else: +allowed_pattern = '(%s)' % '|'.join(allowed) +suffix_pattern = r'\.(?P<%s>%s)$' % (suffix_kwarg, allowed_pattern) +else: + ++ + + |
+