renamed id_name_form to edit_id_name, then made show_id_name and used it for all appropriate classes. Shaved about 150 LOC / removed 5 x duplication of code :)
This commit is contained in:
15
templates/show_id_name.html
Normal file
15
templates/show_id_name.html
Normal file
@@ -0,0 +1,15 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block main_content %}
|
||||
<h3>{{page_title}}</h3>
|
||||
<table id="book_table" class="table table-striped table-sm" data-toolbar="#toolbar" data-search="true">
|
||||
<thead>
|
||||
<tr class="thead-light"><th>Name</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for obj in objects %}
|
||||
<tr><td data-sort="{{obj.id}}"><a href="{{url_for(url_base, id=obj.id )}}">{{obj.name}}</a></td></tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock main_content %}
|
||||
Reference in New Issue
Block a user