{% extends "admin/dj_file_browser_panel/base.html" %} {% load i18n static dcr_icons %} {% block panel_content %}
{% dcr_icon "layers" %}

{% trans "Browsable Roots" %}

{% if roots %} {{ roots|length }} {% trans "CONFIGURED" %} {% endif %}

{% trans "Read-only access to media, static, and any other configured filesystem roots." %}

{% if roots %}

{% trans "Roots" %}

{% for root in roots %} {% endfor %}
{% trans "Root" %} {% trans "Path" %} {% trans "Entries" %}
{{ root.name }} {% if root.description %}
{{ root.description }}
{% endif %}
{{ root.path }} {% if root.entry_count is not None %}{{ root.entry_count }}{% else %}—{% endif %} {% trans "Browse" %}
{% else %}

{% trans "No browsable roots" %}

{% trans "No configured root exists or is a directory. By default the panel browses MEDIA_ROOT and STATIC_ROOT; configure DJ_FILE_BROWSER_PANEL_SETTINGS to add more." %}

{% trans "Example configuration" %}

<> settings.py
DJ_FILE_BROWSER_PANEL_SETTINGS = {
    "ROOTS": [
        {"name": "Media", "path": MEDIA_ROOT},
        {"name": "Static", "path": STATIC_ROOT},
        "/var/www/uploads",
    ],
    "PAGE_SIZE": 100,
    "SHOW_HIDDEN": False,
    "PREVIEW_ENABLED": False,
}
{% endif %} {% endblock %}