This commit is contained in:
Jussi Vaihia 2016-05-22 15:23:11 +00:00
commit 3d981863cb

View File

@ -24,7 +24,7 @@ def apply_suffix_patterns(urlpatterns, suffix_pattern, suffix_required):
else: else:
# Regular URL pattern # Regular URL pattern
regex = urlpattern.regex.pattern.rstrip('$').rstrip('/') + suffix_pattern regex = urlpattern.regex.pattern.rstrip('$').rstrip('/') + suffix_pattern
view = urlpattern._callback or urlpattern._callback_str view = getattr(urlpattern, 'callback', None) or urlpattern._callback or urlpattern._callback_str
kwargs = urlpattern.default_args kwargs = urlpattern.default_args
name = urlpattern.name name = urlpattern.name
# Add in both the existing and the new urlpattern # Add in both the existing and the new urlpattern