{% load i18n admin_extras favorites %} {% if app_list %} {% favorite_map as favorites_map %} {% favorite_entries app_list favorites_map as favorite_entries %} {% if favorite_entries %}
{% for entry in favorite_entries %} {% with app=entry.app model=entry.model fav=entry.favorite ct_id=entry.ct_id %} {% model_app_label model app.app_label as model_app_label %} {% with model_name=model.object_name|lower %} {% endwith %} {% endwith %} {% endfor %}
{% translate 'Favorite models' %}
{% translate 'Model name' %}
{% if ct_id %} {% endif %} {% if model.admin_url %} {{ fav.custom_label|default:model.name }} {% else %} {{ fav.custom_label|default:model.name }} {% endif %}
{% endif %} {% celery_feature_enabled as celery_enabled %} {% for app in app_list %} {% if app.app_label != 'django_celery_beat' or celery_enabled %}
{% for model in app.models %} {% model_app_label model app.app_label as model_app_label %} {% with model_name=model.object_name|lower %} {% favorite_ct_id model_app_label model.object_name as ct_id %} {% favorite_from_map favorites_map ct_id as fav %} {% if not fav %} {% endif %} {% endwith %} {% endfor %}
{{ app.name }}
{% translate 'Model name' %}
{% if ct_id %} {% endif %} {% if model.admin_url %} {{ fav.custom_label|default:model.name }} {% else %} {{ fav.custom_label|default:model.name }} {% endif %}
{% endif %} {% endfor %} {% else %}

{% translate 'You don’t have permission to view or edit anything.' %}

{% endif %}