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:
@@ -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'"""
|
||||
|
||||
Reference in New Issue
Block a user