Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions backend/backend/migrations/0010_alter_member_positions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 6.0.5 on 2026-05-28 17:37

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('backend', '0009_add_email_verification_code'),
]

operations = [
migrations.AlterField(
model_name='member',
name='positions',
field=models.ManyToManyField(related_name='members', through='backend.Appointment', through_fields=('member', 'position'), to='backend.position', verbose_name='Positions'),
),
]
2 changes: 1 addition & 1 deletion backend/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [],
"DIRS": [BASE_DIR / "templates"],
"APP_DIRS": True,
"OPTIONS": {
"context_processors": [
Expand Down
6 changes: 3 additions & 3 deletions backend/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# async functionality
asgiref==3.6.0
asgiref==3.11.1

# Websockets
channels[daphne]==4.0.0
channels_redis==4.1.0

# Django
Django[argon2]==4.1.7
Django[argon2]==6.0.5
django-cors-headers==3.14.0
django-filter==23.2
djangorestframework==3.14.0
Expand All @@ -20,7 +20,7 @@ setuptools<81.0.0
requests>=2.25.0

# Admin theme
django-unfold
django-unfold==0.94.0
django-apscheduler==0.6.2
apscheduler==3.10.1

99 changes: 99 additions & 0 deletions backend/templates/admin/change_list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
{% extends "admin/base_site.html" %}
{% load i18n admin_urls static admin_list unfold_list %}

{% block extrastyle %}
{{ block.super }}

<script src="{% url 'admin:jsi18n' %}"></script>

{{ media.css }}

{% if not actions_on_top and not actions_on_bottom %}
<style>
#changelist table thead th:first-child {width: inherit}
</style>
{% endif %}
{% endblock %}

{% block extrahead %}
{{ block.super }}
{{ media.js }}
{% endblock %}

{% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} change-list{% endblock %}

{% block coltype %}{% endblock %}

{% block nav-global-side %}{% endblock %}

{% block content %}
<div id="content-main">
{% if cl.formset and cl.formset.errors %}
{% include "unfold/helpers/messages/errornote.html" with errors=cl.formset.errors %}

{{ cl.formset.non_form_errors }}
{% endif %}

<div class="flex -mx-4 module{% if cl.has_filters %} filtered{% endif %}" id="changelist" x-data="{ changeListWidth: 0 }">
<div class="result-list-wrapper changelist-form-container flex flex-row grow gap-4 min-w-0 px-4">
<div class="grow min-w-0" x-resize="changeListWidth = $width">
{% block date_hierarchy %}
{% if cl.date_hierarchy %}
{% date_hierarchy cl %}
{% endif %}
{% endblock %}

{% if cl.model_admin.list_before_template and not is_popup %}
{% include cl.model_admin.list_before_template %}
{% endif %}

{% spaceless %}
<div class="flex flex-col flex-wrap gap-3 mb-4 sm:flex-row empty:hidden lg:border lg:border-base-200 lg:dark:border-base-800 lg:-mb-8 lg:p-3 lg:pb-11 lg:rounded-t-default">
{% block search %}
{% search_form cl %}
{% endblock %}

{% include "unfold/helpers/change_list_filter_horizontal.html" %}

<div class="flex gap-3 items-center sm:ml-auto">
{% block filters %}
{% include "unfold/helpers/change_list_filter_button.html" %}
{% endblock %}

{% if has_add_permission %}
{% include "unfold/helpers/add_link.html" %}
{% endif %}
</div>
</div>
{% endspaceless %}

<form id="changelist-form" class="group" method="post"{% if cl.formset and cl.formset.is_multipart %} enctype="multipart/form-data"{% endif %} novalidate>
{% csrf_token %}

{% if cl.formset %}
{{ cl.formset.management_form }}
{% endif %}

{% block result_list %}
{% include "unfold/helpers/change_list_actions.html" %}

{% unfold_result_list cl %}
{% endblock %}
</form>

{% if cl.model_admin.list_after_template and not is_popup %}
{% include cl.model_admin.list_after_template %}
{% endif %}
</div>

{% include "unfold/helpers/change_list_filter_vertical.html" %}
</div>
</div>
</div>
{% endblock %}

{% block footer %}
{% block pagination %}
{% include "unfold/helpers/pagination.html" %}
{% endblock %}
{% endblock %}
18 changes: 18 additions & 0 deletions backend/templates/unfold/helpers/add_link.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{% load i18n admin_urls %}

{% if cl %}
{% url cl.opts|admin_urlname:"add" as add_url %}
{% blocktranslate with name=cl.opts.verbose_name asvar title %}Add {{ name }}{% endblocktranslate %}
{% else %}
{% url opts|admin_urlname:"add" as add_url %}
{% blocktranslate with name=opts.verbose_name asvar title %}Add {{ name }}{% endblocktranslate %}
{% endif %}

{% if add_url %}
{% if cl.model_admin.show_add_link or adminform.model_admin.show_add_link %}
<a href="{% add_preserved_filters add_url is_popup to_field %}" class="addlink bg-primary-600 border border-primary-600 cursor-pointer flex font-medium gap-2 items-center px-3 py-2 rounded-default shadow-xs text-sm text-white hover:bg-primary-600/80" title="{{ title }}">
<span class="material-symbols-outlined md-18">add</span>
{% trans "Add" %}
</a>
{% endif %}
{% endif %}