1
0
mirror of https://github.com/django/django.git synced 2025-02-01 05:10:04 +00:00

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

This commit is contained in:
Tim Graham 2014-04-03 11:03:31 -04:00
parent 8f63849df2
commit 0f6ea69e27

View File

@ -13,7 +13,7 @@ def i18n_patterns(prefix, *args):
function. This may only be used in the root URLconf, not in an included
URLconf.
"""
if isinstance(prefix, (six.text_type, str)):
if isinstance(prefix, six.string_types):
warnings.warn(
"Calling i18n_patterns() with the `prefix` argument and with tuples "
"instead of django.conf.urls.url() instances is deprecated and "