summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2007-07-03 18:29:56 +0000
committerAdrian Holovaty <adrian@holovaty.com>2007-07-03 18:29:56 +0000
commit1feda14c8e14eb4d716d725a58add6dbbb04bd5f (patch)
tree1c58a992a4310d23dcb9c93be49258a3b3b5e0d8 /django
parentc62d6eea19a1e3737ceb2af7f2f75fe727c51906 (diff)
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
Diffstat (limited to 'django')
-rw-r--r--django/contrib/contenttypes/models.py2
-rw-r--r--django/contrib/syndication/feeds.py2
-rw-r--r--django/http/__init__.py4
-rw-r--r--django/template/defaultfilters.py3
4 files changed, 6 insertions, 5 deletions
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)