From 1feda14c8e14eb4d716d725a58add6dbbb04bd5f Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Tue, 3 Jul 2007 18:29:56 +0000 Subject: unicode: Made some documentation edits and inconsequential typo fixes throughout code git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5597 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/contenttypes/models.py | 2 +- django/contrib/syndication/feeds.py | 2 +- django/http/__init__.py | 4 ++-- django/template/defaultfilters.py | 3 ++- 4 files changed, 6 insertions(+), 5 deletions(-) (limited to 'django') diff --git a/django/contrib/contenttypes/models.py b/django/contrib/contenttypes/models.py index 7ac0ce4266..a825b4f3dd 100644 --- a/django/contrib/contenttypes/models.py +++ b/django/contrib/contenttypes/models.py @@ -14,7 +14,7 @@ class ContentTypeManager(models.Manager): try: ct = CONTENT_TYPE_CACHE[key] except KeyError: - # The unicode() is needed around opts.verbose_name because it might + # The smart_unicode() is needed around opts.verbose_name_raw because it might # be a django.utils.functional.__proxy__ object. ct, created = self.model._default_manager.get_or_create(app_label=key[0], model=key[1], defaults={'name': smart_unicode(opts.verbose_name_raw)}) diff --git a/django/contrib/syndication/feeds.py b/django/contrib/syndication/feeds.py index 9f5a8f42f3..428767ae48 100644 --- a/django/contrib/syndication/feeds.py +++ b/django/contrib/syndication/feeds.py @@ -7,7 +7,7 @@ from django.conf import settings def add_domain(domain, url): if not url.startswith('http://'): - # 'url' must already be ASCII and URL-quoted, so no need for encodign + # 'url' must already be ASCII and URL-quoted, so no need for encoding # conversions here. url = u'http://%s%s' % (domain, url) return url diff --git a/django/http/__init__.py b/django/http/__init__.py index 76f9246ca6..14acd9afde 100644 --- a/django/http/__init__.py +++ b/django/http/__init__.py @@ -50,7 +50,7 @@ class HttpRequest(object): def _set_encoding(self, val): """ Sets the encoding used for GET/POST accesses. If the GET or POST - dictionary has already been created it is removed and recreated on the + dictionary has already been created, it is removed and recreated on the next access (so that it is decoded correctly). """ self._encoding = val @@ -101,7 +101,7 @@ class QueryDict(MultiValueDict): This is immutable unless you create a copy of it. Values retrieved from this class are converted from the default encoding to - unicode (this is done on retrieval, rather than input to avoid breaking + unicode (this is done on retrieval, rather than input, to avoid breaking references or mutating referenced objects). """ def __init__(self, query_string, mutable=False, encoding=None): diff --git a/django/template/defaultfilters.py b/django/template/defaultfilters.py index d31f351670..6effac184f 100644 --- a/django/template/defaultfilters.py +++ b/django/template/defaultfilters.py @@ -116,7 +116,8 @@ make_list = stringfilter(make_list) def slugify(value): "Converts to lowercase, removes non-alpha chars and converts spaces to hyphens" - # Don't compile patterns as unicode because \w then would mean any letter. Slugify is effectively an asciiization. + # Don't compile patterns as unicode because \w then would mean any letter. + # Slugify is effectively a conversion to ASCII. value = re.sub('[^\w\s-]', '', value).strip().lower() return re.sub('[-\s]+', '-', value) slugify = stringfilter(slugify) -- cgit v1.3