2
0
Fork 0

order team backup shifts and add page title

This commit is contained in:
Andreas (@xAndy) Zimmermann 2023-05-13 15:34:10 +02:00
parent e774ed833b
commit 6e31bb1378
2 changed files with 5 additions and 7 deletions

View File

@ -1,8 +1,6 @@
{% extends "base.html" %}
{% block title %}Teamschichten{%endblock%}
{% block head %}
{% endblock %}
{% block body %}
<section class="section">

View File

@ -7,8 +7,8 @@ from shiftregister.fallback.models import TeamMember
def my_fallback_shifts(request, team_member_id):
team_member = get_object_or_404(TeamMember, pk=team_member_id)
context = {"team_member": team_member, "shifts": team_member.fallback_shifts.all()}
print(context)
context = {
"team_member": team_member,
"shifts": team_member.fallback_shifts.order_by("start_at").all(),
}
return render(request, "my_fallback_shifts.html", context)