mirror of
https://github.com/django/django.git
synced 2025-11-03 05:13:23 +00:00
[py3] Replaced basestring by six.string_types.
This commit is contained in:
parent
cacd845996
commit
3cb2457f46
73 changed files with 230 additions and 150 deletions
|
|
@ -20,6 +20,7 @@ from django.test.utils import override_settings
|
|||
from django.utils.encoding import smart_unicode
|
||||
from django.utils.functional import empty
|
||||
from django.utils._os import rmtree_errorhandler
|
||||
from django.utils import six
|
||||
|
||||
from django.contrib.staticfiles import finders, storage
|
||||
|
||||
|
|
@ -83,7 +84,7 @@ class BaseStaticFilesTestCase(object):
|
|||
self.assertRaises(IOError, self._get_file, filepath)
|
||||
|
||||
def render_template(self, template, **kwargs):
|
||||
if isinstance(template, basestring):
|
||||
if isinstance(template, six.string_types):
|
||||
template = loader.get_template_from_string(template)
|
||||
return template.render(Context(kwargs)).strip()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue