Commits

Patrick Samson committed 0e80f45

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

  • Participants
  • Parent commits 8f17765

Comments (0)

Files changed (4)

File docs/conf.py

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

File 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

File 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 %}

File postman/tests.py

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