Fixed Python 2.6 support in test code

fix_request_path_info
Diederik van der Boor 2017-05-01 12:45:43 +02:00
parent 56444b0f65
commit 44d79b5a19
1 changed files with 2 additions and 2 deletions

View File

@ -813,9 +813,9 @@ def qrepr(data):
return repr(data) return repr(data)
elif django.VERSION >= (1, 10): elif django.VERSION >= (1, 10):
# Django 1.11 still shows "<QuerySet [", not taking the actual type into account. # Django 1.11 still shows "<QuerySet [", not taking the actual type into account.
return '<{} {}'.format(data.__class__.__name__, repr(data)[10:]) return '<{0} {1}'.format(data.__class__.__name__, repr(data)[10:])
else: else:
# Simulate Django 1.11 behavior for older Django versions. # Simulate Django 1.11 behavior for older Django versions.
return '<{} {}>'.format(data.__class__.__name__, repr(data)) return '<{0} {1}>'.format(data.__class__.__name__, repr(data))
return repr(data) return repr(data)