1
0
mirror of https://github.com/django/django.git synced 2025-10-28 16:16:12 +00:00

Refs #23919 -- Removed misc references to Python 2.

This commit is contained in:
Tim Graham
2017-01-21 20:02:00 -05:00
committed by GitHub
parent c22212220a
commit d170c63351
34 changed files with 40 additions and 167 deletions

View File

@@ -1,5 +1,6 @@
import json
import sys
from collections import UserList
from django.conf import settings
from django.core.exceptions import ValidationError # backwards compatibility
@@ -8,11 +9,6 @@ from django.utils.encoding import force_text
from django.utils.html import escape, format_html, format_html_join, html_safe
from django.utils.translation import ugettext_lazy as _
try:
from collections import UserList
except ImportError: # Python 2
from UserList import UserList
def pretty_name(name):
"""Converts 'first_name' to 'First name'"""