{% extends "studio/base.html" %} {% block studio_title %}{{ model.class_name }}{% endblock %} {% block studio_content %}
Models

{{ model.class_name }}

{{ model.table_name }}

Columns

{{ model.columns | length }} total
{% if not model.columns %}
No columns defined.
{% else %}
{% for column in model.columns %} {% endfor %}
Name Type Flags Foreign key Actions
{{ column.name }} {{ column.type_display }}
{% if column.primary_key %} pk {% endif %} {% if not column.nullable %} not null {% endif %} {% if column.unique %} unique {% endif %} {% if column.index %} index {% endif %} {% if column.default %} default {% endif %}
{% if column.fk %}{{ column.fk.table }}.{{ column.fk.column }}{% else %}—{% endif %}
{% endif %}

Relationships

{{ model.relationships | length }} total
{% if not model.relationships %}
No relationships defined.
{% else %}
{% for rel in model.relationships %} {% endfor %}
Name Target back_populates Cardinality Lazy Actions
{{ rel.name }} {{ rel.target }} {{ rel.back_populates or "—" }} {{ "many" if rel.uselist else "one" }} {% if rel.secondary %} M2M {% endif %} {{ rel.lazy }}
{% endif %}

Add column

Add relationship

{% endblock %}