{% extends "base_template.html" %} {% block title %}{{ model_name }} - Admin{% endblock %} {% block breadcrumb %} {% endblock %} {% block content %}

{{ model_name }}

+ New {{ model_name }}
{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %} {% for category, message in messages %} {% endfor %} {% endif %} {% endwith %} {% if records %}
{% for col in columns %} {% endfor %} {% for record in records %} {% for col in columns %} {% endfor %} {% endfor %}
{{ col.name }} {% if col.primary_key %}PK{% endif %} {% if col.foreign_key %}FK{% endif %} Actions
{% set val = record.__dict__.get(col.name, '') %} {% if val is none %} null {% elif val|string|length > 80 %} {{ val|string|truncate(80) }} {% else %} {{ val }} {% endif %} Edit Delete
{% if pagination.pages > 1 %} {% endif %} {% else %}
No records found for {{ model_name }}. Create the first one.
{% endif %} {% endblock %}