From 1847c9ef64e673837812ba22ec75015a262a3db0 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Wed, 9 Nov 2005 17:39:18 +0000 Subject: [PATCH 1/4] Small formatting fix to docs/settings.txt -- MIDDLEWARE_CLASSES example was scrolling off the page git-svn-id: http://code.djangoproject.com/svn/django/trunk@1140 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/settings.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/settings.txt b/docs/settings.txt index f14d48b257..9b7eb2004a 100644 --- a/docs/settings.txt +++ b/docs/settings.txt @@ -416,7 +416,11 @@ Example: ``"http://media.lawrence.com"`` MIDDLEWARE_CLASSES ------------------ -Default: ``("django.middleware.sessions.SessionMiddleware", "django.middleware.common.CommonMiddleware", "django.middleware.doc.XViewMiddleware")`` +Default:: + + ("django.middleware.sessions.SessionMiddleware", + "django.middleware.common.CommonMiddleware", + "django.middleware.doc.XViewMiddleware") A tuple of middleware classes to use. See the `middleware docs`_. From 0b1d24c54d1ab5efba05ae9d8e0e997c3c1b5b61 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Wed, 9 Nov 2005 17:49:57 +0000 Subject: [PATCH 2/4] Renamed enclosure_url, enclosure_length and enclosure_mime_type to give them an 'item_' prefix, in the new RSS framework git-svn-id: http://code.djangoproject.com/svn/django/trunk@1141 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/core/rss.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/django/core/rss.py b/django/core/rss.py index e75d66ab2b..7ba0c1e30c 100644 --- a/django/core/rss.py +++ b/django/core/rss.py @@ -14,7 +14,7 @@ class FeedDoesNotExist(ObjectDoesNotExist): class Feed: item_pubdate = None - enclosure_url = None + item_enclosure_url = None def item_link(self, item): try: @@ -67,12 +67,12 @@ class Feed: for item in self.__get_dynamic_attr('items', obj): link = add_domain(current_site.domain, self.__get_dynamic_attr('item_link', item)) enc = None - enc_url = self.__get_dynamic_attr('enclosure_url', item) + enc_url = self.__get_dynamic_attr('item_enclosure_url', item) if enc_url: enc = feedgenerator.Enclosure( url = enc_url.decode('utf-8'), - length = str(self.__get_dynamic_attr('enclosure_length', item)).decode('utf-8'), - mime_type = self.__get_dynamic_attr('enclosure_mime_type', item).decode('utf-8'), + length = str(self.__get_dynamic_attr('item_enclosure_length', item)).decode('utf-8'), + mime_type = self.__get_dynamic_attr('item_enclosure_mime_type', item).decode('utf-8'), ) feed.add_item( title = title_template.render(Context({'obj': item, 'site': current_site})).decode('utf-8'), From f85cd32dbda85b6683b6b8a0882f7bc88fb3d060 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Wed, 9 Nov 2005 18:07:06 +0000 Subject: [PATCH 3/4] Improved docs/authentication.txt to note that messages only work with registered users, not anonymous users git-svn-id: http://code.djangoproject.com/svn/django/trunk@1142 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/authentication.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/authentication.txt b/docs/authentication.txt index 55334b697a..e0780902c1 100644 --- a/docs/authentication.txt +++ b/docs/authentication.txt @@ -474,3 +474,8 @@ messages are made available in the `template context`_ as the template variable Note that ``DjangoContext`` calls ``get_and_delete_messages`` behind the scenes, so any messages will be deleted even if you don't display them. + +Finally, note that this messages framework only works with users in the user +database. To send messages to anonymous users, use the `session framework`_. + +.. _session framework: http://www.djangoproject.com/documentation/sessions/ From 31d18380f9dd7b66dfd89857f116a4995990e315 Mon Sep 17 00:00:00 2001 From: Jacob Kaplan-Moss Date: Wed, 9 Nov 2005 18:29:58 +0000 Subject: [PATCH 4/4] Fixed #761; thanks, Eugene git-svn-id: http://code.djangoproject.com/svn/django/trunk@1143 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/core/cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/core/cache.py b/django/core/cache.py index caeb315f05..a479d16dc3 100644 --- a/django/core/cache.py +++ b/django/core/cache.py @@ -336,7 +336,7 @@ class _FileCache(_SimpleCache): return os.path.exists(self._key_to_file(key)) def _cull(self, filelist): - if self.cull_frequency == 0: + if self._cull_frequency == 0: doomed = filelist else: doomed = [k for (i, k) in enumerate(filelist) if i % self._cull_frequency == 0]