This commit is contained in:
Ross
2025-01-02 20:44:16 +00:00
parent 97e76bb100
commit ef49f6a5eb
5 changed files with 45 additions and 2 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ _="on click hide <li.inactive-False/> then show <li.inactive-True/> then set #co
<li class="inactive-{{entry.inactive}}"><a href='{{entry.get_absolute_url}}'>{{entry.exam_code}} / {{entry.exam_name}}</a></li>
{% endfor %}
<li>
</ul>
{% endblock %}
+37
View File
@@ -0,0 +1,37 @@
{% extends 'oef/base.html' %}
{% block content %}
<h2>Entries</h2>
Count: <span id="count">{{ entries|length }}</span>
<table>
<thead>
<tr>
<th>Exam Code</th>
<th>Exam Name</th>
<th>Current Format</th>
</tr>
</thead>
<tbody>
{% for entry in entries %}
<tr><td><a href='{{entry.get_absolute_url}}'>{{entry.exam_code}}</a></td><td>{{entry.exam_name}}</td><td>{{entry.get_current_format}}</td></tr>
{% endfor %}
</table>
{% endblock %}
{% block css %}
<style type="text/css">
.inactive-True a {
color: darkred;
text-decoration: none;
}
.inactive-False a {
text-decoration: none;
}
</style>
{% endblock %}
+1 -1
View File
@@ -5,7 +5,7 @@
{% block content %}
View <a href="{% url 'oef:entries' %}">All</a>
View <a href="{% url 'oef:entries' %}">All</a> <a href="{% url 'oef:entries_table' %}">Export</a>
<div id="view-filter-options">
<details><summary>
+3
View File
@@ -35,6 +35,9 @@ urlpatterns = [
path(
"entries/subspecialties", views.subspecialties, name="subspecialties"
),
path(
"entries/table", views.entries_table, name="entries_table"
),
path(
"entries/all", views.entries, name="entries"
),
+3
View File
@@ -231,6 +231,9 @@ def replace_questions(request):
else:
return render(request, "oef/replace_questions.html", {})
def entries_table(request):
entries = Entry.objects.all().order_by("exam_code")
return render(request, "oef/entries_table.html", {"entries": entries})
def entries(request):
entries = Entry.objects.all().order_by("exam_code")