Adding some titles
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Víðir Valberg Guðmundsson 2023-10-02 20:50:39 +02:00
parent 88e15974dc
commit f42101c476
8 changed files with 26 additions and 2 deletions

2
.gitignore vendored
View File

@ -5,3 +5,5 @@ db.sqlite3
.pytest_cache
.idea/
*.mo
.env
venv/

View File

@ -1,6 +1,10 @@
{% extends "base.html" %}
{% load i18n %}
{% block head_title %}
{% trans "Member detail" %}
{% endblock %}
{% block content %}
<h1>

View File

@ -1,6 +1,10 @@
{% extends "base.html" %}
{% load i18n %}
{% block head_title %}
{% trans "Membership" %}
{% endblock %}
{% block content %}
{% if not current_membership %}

View File

@ -39,6 +39,8 @@ def members_admin(request):
users = get_members()
return render_list(
entity_name="member",
entity_name_plural="members",
request=request,
paginate_by=20,
objects=users,

View File

@ -1 +1,5 @@
{% extends "base.html" %}
{% block head_title %}
{% trans "Home" %}
{% endblock %}

View File

@ -1,4 +1,4 @@
from django.shortcuts import render
from utils.view_utils import render
def index(request):

View File

@ -1,10 +1,14 @@
{% extends "base.html" %}
{% load i18n %}
{% block head_title %}
{{ entity_name_plural|capfirst }}
{% endblock %}
{% block content %}
<h1>
Users <small class="text-muted">{{ total_count }}</small>
{{ entity_name_plural|capfirst }} <small class="text-muted">{{ total_count }}</small>
</h1>
<table class="table table-striped">

View File

@ -46,6 +46,8 @@ class RowAction:
def render_list(
request: HttpRequest,
entity_name: str,
entity_name_plural: str,
objects: list["Model"],
columns: list[tuple[str, str]],
row_actions: list[RowAction] = None,
@ -87,6 +89,8 @@ def render_list(
"list_actions": list_actions,
"total_count": total_count,
"order_by": order_by,
"entity_name": entity_name,
"entity_name_plural": entity_name_plural,
}
if paginate_by: