From 9b8157a45771b2d9b78d5268b830030ad23ad43a Mon Sep 17 00:00:00 2001 From: Patrick Samson Date: Sun, 11 Mar 2012 18:43:21 +0100 Subject: [PATCH] evaluating the queryset submitted to autopaginate ahead of the tag is a lost of performance --- docs/conf.py | 4 ++-- postman/__init__.py | 2 +- postman/templates/postman/base_folder.html | 4 ++-- postman/tests.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 11ce129..d935545 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -45,9 +45,9 @@ copyright = u'2010, Patrick Samson' # built documents. # # The short X.Y version. -version = '1.1' +version = '1.2' # The full version, including alpha/beta/rc tags. -release = '1.1' +release = '1.2' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/postman/__init__.py b/postman/__init__.py index 06d9f56..886fccf 100644 --- a/postman/__init__.py +++ b/postman/__init__.py @@ -1,7 +1,7 @@ """A messaging application for Django""" # following PEP 386: N.N[.N]+[{a|b|c|rc}N[.N]+][.postN][.devN] -VERSION = (1, 1, 0) +VERSION = (1, 2, 0) PREREL = () POST = 0 DEV = 0 diff --git a/postman/templates/postman/base_folder.html b/postman/templates/postman/base_folder.html index 700faaf..7ca4e11 100644 --- a/postman/templates/postman/base_folder.html +++ b/postman/templates/postman/base_folder.html @@ -3,11 +3,11 @@ {% block content %}

{% block pm_folder_title %}{% endblock %}

-{% if pm_messages %} {% autopaginate pm_messages %} {% if invalid_page %}

{% trans "Sorry, this page number is invalid." %}

{% else %} +{% if pm_messages %} {% block pm_by_modes %}
{% if by_message %}{% endif %}{% trans "by conversation" %}{% if by_message %}{% endif %} {% if by_conversation %}{% endif %}{% trans "by message" %}{% if by_conversation %}{% endif %} @@ -46,10 +46,10 @@ {% paginate %} -{% endif %} {% else %}

{% trans "No messages." %}

{% endif %} +{% endif %} {% block pm_footer_info %}{% endblock %}
{% endblock content %} \ No newline at end of file diff --git a/postman/tests.py b/postman/tests.py index 40c4d4d..9eeb375 100644 --- a/postman/tests.py +++ b/postman/tests.py @@ -70,7 +70,7 @@ class GenericTest(TestCase): Usual generic tests. """ def test_version(self): - self.assertEqual(sys.modules['postman'].__version__, "1.1.0") + self.assertEqual(sys.modules['postman'].__version__, "1.2.0") class BaseTest(TestCase): """ -- 2.39.5