Пример #1
0
 def is_language_prefix_patterns_used(self):
     """
     Returns `True` if the `LocaleRegexURLResolver` is used
     at root level of the urlpatterns, else it returns `False`.
     """
     for url_pattern in get_resolver(None).url_patterns:
         if isinstance(url_pattern, LocaleRegexURLResolver):
             return True
     return False
Пример #2
0
def raises404(request):
    resolver = get_resolver(None)
    resolver.resolve('')