Commit 9671bb86 authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Remove old_boards page, make committee name translatable

parent 63a652e8
from django.contrib import admin
from utils.translation import TranslatedModelAdmin
from . import models
class CommitteeAdmin(admin.ModelAdmin):
class CommitteeAdmin(TranslatedModelAdmin):
list_filter = ('until',)
fieldsets = (
(None, {
'fields': (
'name', 'description', 'photo', 'permissions',
'since', 'until'
def get_queryset(self, request):
qs = super().get_queryset(request)
return qs.exclude(board__is_board=True)
class BoardAdmin(admin.ModelAdmin):
class BoardAdmin(TranslatedModelAdmin):
exclude = ('is_board',)
......@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-09-06 19:22+0200\n"
"PO-Revision-Date: 2016-09-06 19:21+0200\n"
"POT-Creation-Date: 2016-09-11 14:27+0200\n"
"PO-Revision-Date: 2016-09-11 14:29+0200\n"
"Last-Translator: Joost Rijneveld <>\n"
"Language-Team: \n"
"Language: nl\n"
......@@ -50,7 +50,7 @@ msgstr "contact e-mailadres"
msgid "committee"
msgstr "commissie"
#: templates/committees/committee_index.html:6
#: templates/activemembers/committee_index.html:6
msgid "committees"
msgstr "commissies"
......@@ -112,119 +112,101 @@ msgstr "De einddatum kan niet voor de startdatum liggen"
msgid "This committee already has a chair"
msgstr "Deze commissie heeft al een voorzitter"
msgid "This member is already in the committee"
msgstr "Deze persoon is al lid van deze commissie"
msgid "This member is already in the committee for this period"
msgstr "Deze persoon is al lid van deze commissie in de aangegeven periode"
msgid "committee membership"
msgstr "commissielidmaatschap"
msgid "committee memberships"
msgstr "commissielidmaatschappen"
#, python-brace-format
msgid "Mentor introduction {year}"
msgstr "Mentor introductie {year}"
#: templates/committees/board_detail.html:4
#: templates/committees/board_index.html:3
#: templates/committees/board_index.html:6
#: templates/committees/board_old.html:3
#: templates/activemembers/board_detail.html:4
#: templates/activemembers/board_index.html:3
#: templates/activemembers/board_index.html:6
msgid "Boards"
msgstr "Besturen"
#: templates/committees/board_detail.html:8
#: templates/committees/board_index.html:33
#: templates/committees/board_index.html:38
#: templates/committees/board_old.html:7 templates/committees/board_old.html:16
#: templates/committees/board_old.html:25
#: templates/committees/board_old.html:34
#: templates/committees/board_old.html:43
#: templates/committees/board_old.html:52
#: templates/committees/board_old.html:61
#: templates/committees/board_old.html:72
#: templates/committees/board_old.html:84
#: templates/committees/board_old.html:96
#: templates/committees/board_old.html:107
#: templates/activemembers/board_detail.html:8
#: templates/activemembers/board_index.html:33
#: templates/activemembers/board_index.html:38
msgid "Board"
msgstr "Besturen"
#: templates/committees/board_detail.html:26
#: templates/activemembers/board_detail.html:26
msgid "Board members"
msgstr "Bestuursleden"
#: templates/committees/board_detail.html:42
#: templates/committees/committee_detail.html:44
#: templates/activemembers/board_detail.html:42
#: templates/activemembers/committee_detail.html:44
msgid "Chair"
msgstr "Voorzitter"
#: templates/committees/board_detail.html:59
#: templates/activemembers/board_detail.html:59
msgid "This board doesn't have any members?"
msgstr "Dit bestuur heeft geen leden?"
#: templates/committees/board_index.html:10
#: templates/activemembers/board_index.html:10
#, python-format
msgid ""
"Thalia's board makes sure all operations during the academic year are taken "
"care of, in front or behind the scenes. If you have any questions then you "
"can address them during the day or, if you're not always on the campus, "
"you're always welcome to <a href=\"\">send them an "
"email</a>. The boards of the years before 2001 can be found on <a href="
"\"%(old_boards_url)s\">this page</a>."
msgstr ""
"Het gehele Thaliabestuur zet zich gedurende een collegejaar in om alle "
"activiteiten van Thalia in goede banen te leiden, voor of achter de "
"schermen. Bij vragen en opmerkingen kun je ze altijd persoonlijk aanspreken "
"of <a href=\"\">mailen</a>. Besturen van langer geleden "
"(eerder dan 2001), zijn op <a href=\"%(old_boards_url)s\">deze pagina</a> te "
"of <a href=\"\">mailen</a>."
#: templates/committees/board_index.html:25
#: templates/committees/committee_detail.html:18
#: templates/committees/committee_detail.html:20
#: templates/activemembers/board_index.html:25
#: templates/activemembers/committee_detail.html:18
#: templates/activemembers/committee_detail.html:20
#, python-format
msgid "Photo of %(name)s"
msgstr "Foto van %(name)s"
#: templates/committees/board_index.html:45
#: templates/activemembers/board_index.html:45
msgid "There are no boards!"
msgstr "Er zijn geen besturen!"
#: templates/committees/board_old.html:6
msgid "Boards (continued)"
msgstr "Besturenoverzicht a.k.a. Besturen van weleer (vervolg)"
#: templates/committees/committee_detail.html:3
#: templates/committees/committee_index.html:3
#: templates/activemembers/committee_detail.html:3
#: templates/activemembers/committee_index.html:3
msgid "Committees"
msgstr "Commissies"
#: templates/committees/committee_detail.html:24
#: templates/activemembers/committee_detail.html:24
#, python-format
msgid "About the %(name)s"
msgstr "Over de %(name)s"
#: templates/committees/committee_detail.html:28
#: templates/activemembers/committee_detail.html:28
msgid "Committee members"
msgstr "Commissieleden"
#: templates/committees/committee_detail.html:51
#: templates/activemembers/committee_detail.html:51
#, python-format
msgid "Committee member since: %(since)s"
msgstr "Commissielid sinds: %(since)s"
#: templates/committees/committee_detail.html:61
#: templates/activemembers/committee_detail.html:61
msgid "This committee doesn't have any members?"
msgstr "Deze commissie heeft geen leden?"
#: templates/committees/committee_index.html:39
#: templates/activemembers/committee_index.html:39
msgid "There are no committees!"
msgstr "Er zijn geen commissies!"
# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-09-11 12:34
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('activemembers', '0009_auto_20160906_1931'),
def forwards_func(apps, schema_editor):
Committee = apps.get_model("activemembers", "committee")
db_alias = schema_editor.connection.alias
for committee in Committee.unfiltered_objects.using(db_alias).all():
committee.name_en = committee.name_nl
def reverse_func(apps, schema_editor):
operations = [
migrations.RenameField('committee', 'name', 'name_nl'),
field=models.CharField(default='', max_length=40, unique=True,
verbose_name='Committee name (EN)'),
field=models.CharField(max_length=40, unique=True,
verbose_name='Committee name (NL)'),
migrations.RunPython(forwards_func, reverse_func),
......@@ -7,6 +7,7 @@ from django.db import models
from django.urls import reverse
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
from utils.translation import MultilingualField, ModelTranslateMeta
from members.models import Member
......@@ -29,14 +30,15 @@ class ActiveCommitteeManager(models.Manager):
class Committee(models.Model):
class Committee(models.Model, metaclass=ModelTranslateMeta):
"""A committee"""
unfiltered_objects = models.Manager()
objects = CommitteeManager()
active_committees = ActiveCommitteeManager()
name = models.CharField(
name = MultilingualField(
verbose_name=_('Committee name'),
......@@ -8,7 +8,7 @@
<p style="text-align: center;">
{% url 'committees:board_old' as old_boards_url %}
{% blocktrans trimmed %}
Thalia's board makes sure all operations during the academic year are taken care of, in front or behind the scenes. If you have any questions then you can address them during the day or, if you're not always on the campus, you're always welcome to <a href="">send them an email</a>. The boards of the years before 2001 can be found on <a href="{{ old_boards_url }}">this page</a>.
Thalia's board makes sure all operations during the academic year are taken care of, in front or behind the scenes. If you have any questions then you can address them during the day or, if you're not always on the campus, you're always welcome to <a href="">send them an email</a>.
{% endblocktrans %}
{% extends "base.html" %}
{% load i18n thumbnail static %}
{% block title %}{% trans 'Boards' %} — {{ block.super }}{% endblock %}
{% block body %}
<h1>{% trans "Boards (continued)" %}</h1>
<h2>{% trans "Board" %} 2000-2001</h2>
<li>Jelte Jansen, Voorzitter</li>
<li>Linus Wiggers, Secretaris</li>
<li>Martijn Broenland, Penningmeester</li>
<li>Michel Groenenstijn, Voorzitter Evenementencommissie</li>
<li>Matthijs Mekking, Voorzitter Kantinecommissie</li>
<li>The-Vinh Nguyen, Voorzitter Publiciteitscommissie</li>
<h2>{% trans "Board" %} 1999-2000</h2>
<li>Jelte Jansen, Voorzitter</li>
<li>Miek Gieben, Secretaris</li>
<li>Stephan Jager, Penningmeester</li>
<li>The-Vinh Nguyen, Voorzitter Evenementencommissie</li>
<li>Michel Groenenstijn, Voorzitter Kantinecommissie</li>
<li>Merijn Vogel, Voorzitter Publiciteitscommissie</li>
<h2>{% trans "Board" %} 1998-1999</h2>
<li>Martin Bruggink, Voorzitter</li>
<li>Miek Gieben, Secretaris</li>
<li>Bas Passon, Penningmeester</li>
<li>The-Vinh Nguyen, Voorzitter Evenementencommissie</li>
<li>Jelte Jansen, Voorzitter Kantinecommissie</li>
<li>Jeroen Kratz, Voorzitter Publiciteitscommissie</li>
<h2>{% trans "Board" %} 1997-1998</h2>
<li>Mariëlle Weers, Voorzitter</li>
<li>Martin Bruggink, Secretaris</li>
<li>Jeroen Houba, Penningmeester</li>
<li>Gert-Jan Haverkamp, Voorzitter Evenementencommissie</li>
<li>Michel Schaake, Voorzitter Kantinecommissie</li>
<li>Bram de Kruijff, Voorzitter Publiciteitscommissie</li>
<h2>{% trans "Board" %} 1996-1997</h2>
<li>Mariëlle Weert, Voorzitter</li>
<li>Michael van de Ven, Secretaris</li>
<li>Jeroen Houba, Penningmeester</li>
<li>Emile ter Horst, Voorzitter Evenementencommissie</li>
<li>Bram de Kruijf, Voorzitter Kantinecommissie</li>
<li>Pieter van Engelen, Voorzitter Publiciteitscommissie</li>
<h2>{% trans "Board" %} 1995-1996</h2>
<li>Edwin Hendriks, Voorzitter</li>
<li>Michael van de Ven, Secretaris</li>
<li>Jeroen Houba, Penningmeester</li>
<li>Jan Sloots, Voorzitter Evenementencommissie</li>
<li>Dave Walravens, Voorzitter Kantinecommissie</li>
<li>Pieter van Engelen, Voorzitter Publiciteitscommissie</li>
<h2>{% trans "Board" %} 1994-1995</h2>
<li>Rody Middelkoop, Voorzitter</li>
<li>Servé Herman, Secretaris</li>
<li>Jeroen Houba, Penningmeester</li>
<li>Max Verbong, Voorzitter Evenementencommissie</li>
<li>Niels Brouwers, Voorzitter Kantinecommissie</li>
<li>Paul Lemmens, Voorzitter Publiciteitscommissie</li>
<li>Peter Wouda, Commissielid BBC</li>
<li>Michael van de Ven, Voorzitter TOEC</li>
<h2>{% trans "Board" %} 1993-1994</h2>
<li>Mark Koenen, Voorzitter</li>
<li>Servé Herman, Secretaris</li>
<li>Rogier Schram, Penningmeester</li>
<li>Erik van Esch, Voorzitter Evenementencommissie</li>
<li>Eugene Zegers, Voorzitter Excursiecommissie</li>
<li>Marco Pil, Voorzitter Kantinecommissie</li>
<li>Rody Middelkoop, Voorzitter Publiciteitscommissie</li>
<li>Theo Wiggerts, Voorzitter Boekencommissie FiFo</li>
<li>Mariëlle Stoeling, Voorzitter TOEC</li>
<h2>{% trans "Board" %} 1992-1993</h2>
<li>Jeroen Huinink, Voorzitter</li>
<li>Peter Wouda, Secretaris</li>
<li>Caspar Derksen, Penningmeester</li>
<li>Walter de Hoon (vervanger: Serve Hermans), Voorzitter Evenementencommissie</li>
<li>Patrick Reijnen, Voorzitter Excursiecommissie</li>
<li>Marco Pil, Voorzitter Kantinecommissie</li>
<li>Patrick Atoon, Voorzitter Publiciteitscommissie</li>
<li>Marc Verspeek (vervanger: Theo Wiggerts), Voorzitter Boekencommissie FiFo</li>
<li>Rene Schreurs (vervanger: Mariëlle Stoelinga), Voorzitter TOEC</li>
<h2>{% trans "Board" %} 1991-1992</h2>
<li>Marc Verspeek, Voorzitter</li>
<li>Jeroen Bongenaar, Secretaris, vervangend voorzitter Impulscommissie</li>
<li>Mariëlle Stoelinga, Penningmeester</li>
<li>Jeroen Huinink, Voorzitter Evenementencommissie</li>
<li>Patrick Reijnen, Voorzitter Excursiecommissie</li>
<li>Marco Pil, Voorzitter Kantinecommissie</li>
<li>Hugo Elbers, Voorzitter Publiciteitscommissie</li>
<li>Bart Putman, Voorzitter Boekencommissie FIFO</li>
<h2>{% trans "Board" %} 1990-1991</h2>
<li>Patrick Reijnen, Voorzitter Algemeen Bestuur</li>
<li>Richard de Beijer, Secretaris Algemeen Bestuur</li>
<li>Erik Kohl, Penningmeester Algemeen Bestuur</li>
<li>Jeroen Bongenaar, Voorzitter Publiciteitscommissie</li>
<li>Leon Pillich, Voorzitter Evenementencommissie</li>
<li>Charles Hendriks, Voorzitter Impulscommissie</li>
<li>Chris Hendriks, Voorzitter Boekencommissie FIFO</li>
<li>Louis van Hemmen, Voorzitter Kantinecommissie</li>
<li>Daniël Rutte, Voorzitter Excursiecommissie</li>
{% endblock %}
\ No newline at end of file
......@@ -39,10 +39,6 @@ def board_index(request):
{'boards': boards})
def board_old(request):
return render(request, 'committees/board_old.html')
def board_detail(request, id):
"""View the details of a committee"""
board = get_object_or_404(Board, pk=id)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment