diff --git a/zsite/templates/aldryn_people/includes/people_item.html b/zsite/templates/aldryn_people/includes/people_item.html
index b60b256..0a96a6a 100644
--- a/zsite/templates/aldryn_people/includes/people_item.html
+++ b/zsite/templates/aldryn_people/includes/people_item.html
@@ -1,4 +1,4 @@
-{% load menu_tags aldryn_people_tags cms_tags i18n thumbnail %}
+{% load menu_tags aldryn_people_tags cms_tags i18n thumbnail query %}
{% show_breadcrumb 2 %}
@@ -28,8 +28,9 @@
{% spaceless %}
Статьи
- {% for article in person.blog_post_author.all %}
- {{ article }}
+ {% query person.blog_post_author categories__id=4 as articles %}
+
+ {% for article in articles %}
- {{ article.title }}
{{ article.date_published|date:"DATE_FORMAT" }}
{% endfor %}
diff --git a/zsite/templatetags/query.py b/zsite/templatetags/query.py
new file mode 100644
index 0000000..003300e
--- /dev/null
+++ b/zsite/templatetags/query.py
@@ -0,0 +1,12 @@
+from django import template
+register = template.Library()
+
+@register.assignment_tag
+def query(qs, **kwargs):
+ """ template tag which allows queryset filtering. Usage:
+ {% query books author=author as mybooks %}
+ {% for book in mybooks %}
+ ...
+ {% endfor %}
+ """
+ return qs.filter(**kwargs)
\ No newline at end of file