maposmatic-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Maposmatic-dev] [PATCH 2/2] Fix Django 1.0 compatibility


From: Maxime Petazzoni
Subject: [Maposmatic-dev] [PATCH 2/2] Fix Django 1.0 compatibility
Date: Sun, 10 Jan 2010 21:41:22 +0100

---
 www/templates/maposmatic/all_maps.html |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/www/templates/maposmatic/all_maps.html 
b/www/templates/maposmatic/all_maps.html
index 7b3f3c0..860c8a4 100644
--- a/www/templates/maposmatic/all_maps.html
+++ b/www/templates/maposmatic/all_maps.html
@@ -46,15 +46,22 @@
 </div>
 {% endifnotequal %}
 
+{% comment %}For Django 1.0.x compatibility. With Django >= 1.1 we should use 
the empty tag.{% endcomment %}
+{% if maps.object_list|length %}
 {% for job in maps.object_list %}
 <div class="job {% cycle jobodd,jobeven %}">
   {% include "maposmatic/map.html" %}
 </div>
-{% empty %}
+{% endfor %}
+{% else %}
 <p>
+{% if current_letter %}
   {% blocktrans %}No map starts with {{ current_letter }} in our database!{% 
endblocktrans %}
+{% else %}
+  {% blocktrans %}Our database does not contain any rendered maps for the 
moment.{% endblocktrans %}
+{% endif %}
 </p>
-{% endfor %}
+{% endif %}
 
 {% ifnotequal maps.paginator.num_pages 1 %}
 <div class="pagination">
-- 
1.6.3.3.261.g85c6





reply via email to

[Prev in Thread] Current Thread [Next in Thread]