{% extends "admin/dj_cache_panel/base.html" %} {% load i18n static dcr_icons %} {% block extrahead %} {{ block.super }} {% endblock %} {% block panel_content %}
{% dcr_icon "layers" %}

{% trans "DJ Cache Panel" %}

{% trans "Inspect and manage the cache backends configured for this project." %}

{% if caches_info %}

{% trans "Cache Instances" %} {{ caches_info|length }} {% trans "CONFIGURED" %}

{% for cache_info in caches_info %} {% endfor %}
{% trans "Cache Name" %} {% trans "Backend" %} {% trans "Query" %} {% trans "Get" %} {% trans "Edit" %} {% trans "Add" %} {% trans "Delete" %} {% trans "Flush" %}
{{ cache_info.name }} {{ cache_info.backend_short }} {% if cache_info.error %}
{{ cache_info.error }} {% endif %}
{% if cache_info.abilities.query %} {% else %} {% endif %} {% if cache_info.abilities.get_key %} {% else %} {% endif %} {% if cache_info.abilities.edit_key %} {% else %} {% endif %} {% if cache_info.abilities.add_key %} {% else %} {% endif %} {% if cache_info.abilities.delete_key %} {% else %} {% endif %} {% if cache_info.abilities.flush_cache %} {% else %} {% endif %}

{% trans "Abilities Legend" %}

{% else %}

{% trans "Cache Configuration Required" %}

{% trans "To use the Cache panel, you must configure cache instances in your Django settings, e.g.:" %}

CACHES = {
    "default": {
        "BACKEND": "django.core.cache.backends.redis.RedisCache",
        "LOCATION": "redis://127.0.0.1:6379",
    }
}

{% trans "After adding the configuration, restart your Django server to see your Cache instances." %}

{% endif %} {% endblock %}