{% extends "vantage/base.html" %} {% load vantage i18n %} {% block content %}

{{ page_title }}

{% blocktranslate count counter=graph.nodes|length asvar model_count %}{{ counter }} model{% plural %}{{ counter }} models{% endblocktranslate %} {% blocktranslate count counter=graph.edges|length asvar relation_count %}{{ counter }} relation{% plural %}{{ counter }} relations{% endblocktranslate %} {% blocktranslate trimmed with models=model_count relations=relation_count %} {{ models }}, {{ relations }}. Derived from the registry, so it is never out of date. {% endblocktranslate %}

{% if graph.is_empty %}
{% icon "box" class="v-empty-icon" %}

{% translate "Nothing to map." %}

{% translate "No models are registered, or none are visible to you." %}

{% else %}

{% translate "Schema" %}

{% translate "foreign key" %} {% translate "one to one" %} {% translate "many to many" %}
{% comment %} Laid out server-side. A schema graph is tens of nodes, not thousands, so a layered layout in Python means the page needs no JavaScript, prints, and cannot flash. {% endcomment %} {% translate "Schema diagram" %} {% for edge in graph.edges %} {{ edge.source }}.{{ edge.label }} → {{ edge.target }} {% endfor %} {% for node in graph.nodes %} {{ node.label }} {% blocktranslate with fields=node.count_fields %}{{ fields }} fields{% endblocktranslate %} {% endfor %}
{% endif %} {% endblock %}