Fixed a bunch of imports of the email stdlib module now that we are on Python 2.5 to ease the Python 3 port. Thanks, Martin von Löwis.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16731 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jannis Leidel 2011-09-09 16:18:38 +00:00
parent 387e192f25
commit ddaca29d3d
6 changed files with 13 additions and 12 deletions

View File

@ -1,8 +1,9 @@
"Misc. utility functions/classes for admin documentation generator."
import re
from email.Parser import HeaderParser
from email.Errors import HeaderParseError
from email.parser import HeaderParser
from email.errors import HeaderParseError
from django.utils.safestring import mark_safe
from django.core.urlresolvers import reverse
from django.utils.encoding import smart_str

View File

@ -4,7 +4,7 @@ from django import forms
from django.forms.util import ErrorDict
from django.conf import settings
from django.contrib.contenttypes.models import ContentType
from models import Comment
from django.contrib.comments.models import Comment
from django.utils.crypto import salted_hmac, constant_time_compare
from django.utils.encoding import force_unicode
from django.utils.text import get_text_list

View File

@ -2,13 +2,13 @@ import mimetypes
import os
import random
import time
from email import Charset, Encoders
from email import charset as Charset, encoders as Encoders
from email.generator import Generator
from email.MIMEText import MIMEText
from email.MIMEMultipart import MIMEMultipart
from email.MIMEBase import MIMEBase
from email.Header import Header
from email.Utils import formatdate, getaddresses, formataddr, parseaddr
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from email.mime.base import MIMEBase
from email.header import Header
from email.utils import formatdate, getaddresses, formataddr, parseaddr
from django.conf import settings
from django.core.mail.utils import DNS_NAME

View File

@ -78,7 +78,7 @@ class Command(BaseCommand):
return zipfile.ZipFile.read(self, self.namelist()[0])
compression_types = {
None: file,
None: open,
'gz': gzip.GzipFile,
'zip': SingleZipReader
}

View File

@ -4,7 +4,7 @@ import re
import sys
import urllib
import urlparse
from email.Utils import formatdate
from email.utils import formatdate
from django.utils.datastructures import MultiValueDict
from django.utils.encoding import smart_str, force_unicode