Kaydet (Commit) 0f6ea69e authored tarafından Tim Graham's avatar Tim Graham

Cleaned up string detection for a deprecation warning by using six.string_types.

üst 8f63849d
...@@ -13,7 +13,7 @@ def i18n_patterns(prefix, *args): ...@@ -13,7 +13,7 @@ def i18n_patterns(prefix, *args):
function. This may only be used in the root URLconf, not in an included function. This may only be used in the root URLconf, not in an included
URLconf. URLconf.
""" """
if isinstance(prefix, (six.text_type, str)): if isinstance(prefix, six.string_types):
warnings.warn( warnings.warn(
"Calling i18n_patterns() with the `prefix` argument and with tuples " "Calling i18n_patterns() with the `prefix` argument and with tuples "
"instead of django.conf.urls.url() instances is deprecated and " "instead of django.conf.urls.url() instances is deprecated and "
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment