{% extends "base.html" %} {% block title %}{{ model_name }} #{{ pk_value }} — KORM Admin{% endblock %} {% block content %}

{{ model_name }} #{{ pk_value }}

Edit
Back to list
{% for col in columns %} {% endfor %}
{{ col.name }} {% set val = row.get(col.name) %} {% if val is none %} NULL {% elif col.type in ('datetime', 'timestamp', 'date') and val %} {{ val }} {% elif col.type == 'boolean' %} {{ 'true' if val else 'false' }} {% elif val is mapping or val is sequence and val is not string %}
{{ val | tojson }}
{% else %} {{ val }} {% endif %}
{% if relations %}

Relations

{% for rel in relations %}
{{ rel.name }} {{ rel.type }}
Model: {{ rel.model }}
{% if rel.foreign_key %}
FK: {{ rel.foreign_key }}
{% endif %}
Browse {{ rel.model }}
{% endfor %}
{% endif %} {% endblock %}