Update urlpatterns.py

Allow numbers in format extension.
This commit is contained in:
jgomezb 2013-11-14 09:22:07 +01:00
parent 134ffd96a1
commit 6be62bc1d7

View File

@ -57,6 +57,6 @@ def format_suffix_patterns(urlpatterns, suffix_required=False, allowed=None):
allowed_pattern = '(%s)' % '|'.join(allowed)
suffix_pattern = r'\.(?P<%s>%s)$' % (suffix_kwarg, allowed_pattern)
else:
suffix_pattern = r'\.(?P<%s>[a-z]+)$' % suffix_kwarg
suffix_pattern = r'\.(?P<%s>[a-z0-9]+)$' % suffix_kwarg
return apply_suffix_patterns(urlpatterns, suffix_pattern, suffix_required)