{% extends "studio/base.html" %} {% block studio_title %}Canvas{% endblock %} {% block extend_header %} {% endblock %} {% block studio_content %}

Canvas

Data model overview

Routes
{% if not models %}

Nothing to model yet

Create a model to start building relationships.

{% else %}

New relationship

Models

{% for model in models %}

{{ model.class_name }}

{{ model.table_name }}

{% for column in model.columns[:6] %}
{{ column.name }}
{{ column.type }}
{% endfor %} {% if model.columns | length > 6 %}

+{{ model.columns | length - 6 }} more

{% endif %}
{{ model.relationships | length }} relationship{{ "s" if model.relationships | length != 1 else "" }}
Column Generate CRUD
{% endfor %}

Relationship graph

{% if graph_nodes %}

Drag a model node onto another model to start a relationship. Double-click a node to open its detail page.

{% else %}

No models to graph yet.

{% endif %}

Relationships

{% set has_relationships = models | selectattr("relationships") | list | length > 0 %} {% if not has_relationships %}

No relationships defined yet.

{% else %}
{% for model in models %} {% for rel in model.relationships %}
{{ model.class_name }} {{ rel.name }} {{ rel.target }} {{ rel.back_populates or "—" }}
{{ "many" if rel.uselist else "one" }} {{ rel.lazy }} {% if rel.secondary %} M2M {% endif %}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% include "studio/partials/new_model_modal.html" %} {% endblock %}