a small relational database with user-editable schema for manual data entry
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
{% extends "_layout" %}
|
|
|
|
|
|
|
|
{% block title -%}
|
|
|
|
Index
|
|
|
|
{%- endblock %}
|
|
|
|
|
|
|
|
{% block nav -%}
|
|
|
|
<a href="/">Home</a>
|
|
|
|
{%- endblock %}
|
|
|
|
|
|
|
|
{% block content -%}
|
|
|
|
|
|
|
|
<h1>Welcome to YOPA</h1>
|
|
|
|
|
|
|
|
<a href="/model/object/create">New model</a>
|
|
|
|
|
|
|
|
<h2>Defined models:</h2>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
{% for model in models %}
|
|
|
|
<li>
|
|
|
|
<b title="{{model.id}}">{{model.name}}</b><br>
|
|
|
|
|
|
|
|
{% if model.properties %}
|
|
|
|
Properties:
|
|
|
|
<ul>
|
|
|
|
{% for prop in model.properties %}
|
|
|
|
<li>
|
|
|
|
{{prop.name}}, {{prop.data_type}}
|
|
|
|
{%- if prop.default -%}
|
|
|
|
, default: "{{prop.default | print_typed_value}}"
|
|
|
|
{%- endif -%}
|
|
|
|
{%- if prop.optional %}, OPTIONAL{% endif %}
|
|
|
|
{%- if prop.multiple %}, MULTIPLE{% endif %}
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<a href="/model/property/create/{{model.id}}">Add a property</a><br>
|
|
|
|
|
|
|
|
{% if model.relations %}
|
|
|
|
Relations:
|
|
|
|
<ul>
|
|
|
|
{% for rel in model.relations %}
|
|
|
|
<li>
|
|
|
|
<span title="{{rel.model.id}}">"{{rel.model.name}}", pointing to: <i>{{rel.related_name}}</i></span><br>
|
|
|
|
|
|
|
|
{% if rel.properties %}
|
|
|
|
Properties:
|
|
|
|
<ul>
|
|
|
|
{% for prop in rel.properties %}
|
|
|
|
<li title="{{prop.id}}">
|
|
|
|
{{prop.name}}, {{prop.data_type}}
|
|
|
|
{%- if prop.default -%}
|
|
|
|
, default: "{{prop.default | print_typed_value}}"
|
|
|
|
{%- endif -%}
|
|
|
|
{%- if prop.optional %}, OPTIONAL{% endif %}
|
|
|
|
{%- if prop.multiple %}, MULTIPLE{% endif %}
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<a href="/model/property/create/{{rel.model.id}}">Add a property</a>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<a href="/model/relation/create/{{model.id}}">Add a relation</a>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
{%- endblock %}
|