Commits

Patrick Samson committed 0e80f45

evaluating the queryset submitted to autopaginate ahead of the tag is a lost of performance

Comments (0)

Files changed (4)

 # 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.

postman/__init__.py

 """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

postman/templates/postman/base_folder.html

 {% block content %}
 <div id="postman">
 <h1>{% block pm_folder_title %}{% endblock %}</h1>
-{% if pm_messages %}
 {% autopaginate pm_messages %}
 {% if invalid_page %}
 <p>{% trans "Sorry, this page number is invalid." %}</p>
 {% else %}
+{% if pm_messages %}
 {% block pm_by_modes %}<div id="pm_by_modes">
 <span class="pm_by_mode">{% if by_message %}<a href="{{ by_conversation_url }}">{% endif %}{% trans "by conversation" %}{% if by_message %}</a>{% endif %}</span>
 <span class="pm_by_mode">{% if by_conversation %}<a href="{{ by_message_url }}">{% endif %}{% trans "by message" %}{% if by_conversation %}</a>{% endif %}</span>
 </table>
 </form>
 {% paginate %}
-{% endif %}
 {% else %}
 <p>{% trans "No messages." %}</p>
 {% endif %}
+{% endif %}
 {% block pm_footer_info %}{% endblock %}
 </div>
 {% endblock content %}
     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):
     """
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.