Better approach to generic list templates + other deduplication

This commit is contained in:
2020-10-08 22:54:30 +01:00
parent af7d3c4070
commit 3903481b3d
33 changed files with 252 additions and 309 deletions

View File

@@ -4,12 +4,6 @@
{% load static %}
{% load multiply from filters %}
{% block title %}
{% if object.pk %}
Event {% if object.is_rig %}N{{ object.pk|stringformat:"05d" }}{% else %}{{ object.pk }}{% endif %}
{% else %}New Event{% endif %}
{% endblock %}
{% block css %}
{{ block.super }}
<link rel="stylesheet" href="{% static 'css/bootstrap-select.css' %}"/>
@@ -131,17 +125,6 @@
<form class="form-horizontal itemised_form" role="form" method="POST">
{% csrf_token %}
<div class="row">
<div class="col-sm-12">
<h2>
{% if duplicate %}
Duplicate of Event N{{ object.pk|stringformat:"05d" }}
{% elif object.pk %}
Event N{{ object.pk|stringformat:"05d" }}
{% else %}
New Event
{% endif %}
</h2>
</div>
<div class="col-12">
{% include 'form_errors.html' %}
</div>