{% extends "admin/base_site.html" %}
{% load i18n admin_list admin_urls static verbose_names %}
{% block extrastyle %}
{{ block.super }}
{% endblock %}
{% block extrahead %}
{% endblock %}
{% block breadcrumbs %}
{% endblock %}
{% block content %}
-
{% if object.parent_id %}
{% trans 'Вверх' %}
{% else %}
Нет родителя
{% endif %}
{% if not is_hide %}
{% with parent_field|tuple_filter:object.pk as filter_args %}
{% with descendants|filter_objects_by_parent:filter_args as filtered_descendants %}
{{ descendant.pk }}
{% if object.pk|to_string != hide %}
{% include 'admin/django_admin_tree/recursive_categories.html' with obj=object descendants=filtered_descendants all_descendants=descendants %}
{% else %}
{% include 'admin/django_admin_tree/recursive_categories.html' with obj=object descendants=filtered_descendants all_descendants=descendants is_hide=True %}
{% endif %}
{% endwith %}
{% endwith %}
{% else %}
{% endif %}
{% endblock %}