Added caching of latest blog posts fetched from wolnepodreczniki blog.
[wolnelektury.git] / templates / catalogue / main_page.html
index b715f47..db7c95d 100644 (file)
@@ -1,5 +1,5 @@
 {% extends "base.html" %}
-{% load catalogue chunks %}
+{% load catalogue_tags chunks cache %}
 
 {% block bodyid %}main-page{% endblock %}
 
@@ -17,8 +17,8 @@
         {% chunk "site-description" %}
     </div>
     <div class="clearboth"></div>
-    <form action="." method="get" accept-charset="utf-8" id="search-form">
-        <p>{{ form.q }} <input type="submit" value="Szukaj" /> <strong>lub</strong> <a href="{% url catalogue.views.book_list %}">zobacz spis utworów</a> w naszym zbiorze</p>
+    <form action="{% url search %}" method="get" accept-charset="utf-8" id="search-form">
+        <p>{{ form.q }} {{ form.tags }} <input type="submit" value="Szukaj" /> <strong>lub</strong> <a href="{% url catalogue.views.book_list %}">zobacz spis utworów</a> w naszym zbiorze</p>
     </form>
     
     <div id="tags-list">
@@ -83,6 +83,8 @@
     
     <div id="latest-blog-posts">
         <h2>Aktualności z naszego bloga</h2>
+        {% cache 1800 latest-blog-posts %}
         {% latest_blog_posts "http://wolnepodreczniki.pl/feed/?s=Wolne%20Lektury" %}
+        {% endcache %}
     </div>
 {% endblock %}