Commit 27ee5c5a authored by WKuipers's avatar WKuipers
Browse files

Merge branch 'master' into 60-general-meetingdocuments-add-form

parents 6dae26cc 45b78962
* text=auto eol=lf
# Images should be treated as binary
*.png binary
*.jpeg binary
......
# Dit bestand regelt een mooie weergave in git shortlog.
# Who Other identity
# somehow heeft Sébastiaan er drie nodig om ze samen te voegen
Sébastiaan Versteeg <se_bastiaan@outlook.com> <sebastiaan@jupiter.local>
Sébastiaan Versteeg <se_bastiaan@outlook.com> <s.versteeg@student.science.ru.nl>
Sébastiaan Versteeg <se_bastiaan@outlook.com> <se_bastiaan@outlook.com>
Thom Wiggers <thom@thomwiggers.nl> <t.wiggers@student.science.ru.nl>
Jan Martens <jan-martens@hotmail.com> <jan-martens@hotmail.com>
Luuk Scholten <info@luukscholten.com> <l.scholten@student.science.ru.nl>
Joost Rijneveld <joost@joostrijneveld.nl> <l.rijneveld@science.ru.nl>
Nienke Wessel <n.wessel@xs4all.nl>
FROM python:3.5-alpine
MAINTAINER Thom Wiggers <thom@thomwiggers.nl>
LABEL version=1.0
LABEL description="Contains the Thaliawebsite Django application"
# Try to keep static operation on top to maximise Docker cache utilisation
# Disable output buffering
ENV DJANGO_PRODUCTION 1
ENV PYTHONUNBUFFERED 1
# Create log dir
RUN mkdir /log/
RUN touch /log/uwsgi.log
# Create app directory
RUN mkdir -p /usr/src/app
# Create entry points
WORKDIR /usr/local/bin
COPY resources/entrypoint.sh /usr/local/bin/entrypoint.sh
COPY resources/entrypoint_production.sh /usr/local/bin/entrypoint_production.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint_production.sh
# Install dependencies
RUN apk add --no-cache \
gettext \
bash \
postgresql-client \
libwebp \
tiff \
zlib \
freetype \
uwsgi \
lcms2 \
libjpeg-turbo \
nodejs
# Install build deps
RUN apk add --no-cache --virtual .builddeps \
build-base \
tiff-dev \
libjpeg-turbo-dev \
zlib-dev \
freetype-dev \
lcms2-dev \
libwebp-dev \
postgresql-dev
WORKDIR /usr/src/app
# install python requirements
COPY requirements.txt /usr/src/app/
COPY production-requirements.txt /usr/src/app/
RUN pip install --no-cache-dir \
-r requirements.txt \
-r production-requirements.txt
# Install nodejs-less
RUN npm install -g less mkdirp
RUN apk del .builddeps
# copy app source
COPY website /usr/src/app/
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["--help"]
......@@ -36,7 +36,7 @@ Pillow dependencies
For Ubuntu 16.04, use:
apt-get install python-dev gettext gcc build-essential libtiff5-dev libjpeg62-turbo-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev
apt-get install python3-dev gettext gcc build-essential libtiff5-dev libjpeg62-turbo-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev
Or try:
......
version: '2'
services:
postgres:
image: postgres
environment: &postgresvars
POSTGRES_DB: thalia
web:
build: .
command: runserver 0.0.0.0:8000
ports:
- 8000:8000
depends_on:
- postgres
volumes:
- ./website:/usr/src/app
environment:
<<: *postgresvars
DJANGO_DEBUG: 'True'
DJANGO_POSTGRES_HOST: postgres
#!/bin/bash
set -e
until psql -h "$DJANGO_POSTGRES_HOST" -U "postgres" -c '\l'; do
>&2 echo "PostgreSQL is unavailable: Sleeping"
sleep 5
done
>&2 echo "PostgreSQL is up"
cd /usr/src/app
>&2 echo "Running ./manage.py $@"
./manage.py $@
#!/bin/bash
set -e
until psql -h "$DJANGO_POSTGRES_HOST" -U "postgres" -c '\l'; do
>&2 echo "PostgreSQL is unavailable: Sleeping"
sleep 5
done
>&2 echo "PostgreSQL is up"
cd /usr/src/app
>&2 echo "Running site with uwsgi"
uwsgi --chdir /usr/src/app \
--socket :8000 \
--threads 2 \
--processes 4 \
--module thaliawebsite.wsgi:application \
--lazy-app \
--harakiri 20 \
--max-requests 5000 \
--vacuum \
--logto '/log/uwsgi.log'
from django.contrib import admin
from utils.translation import TranslatedModelAdmin
from . import models
@admin.register(models.Committee)
class CommitteeAdmin(admin.ModelAdmin):
class CommitteeAdmin(TranslatedModelAdmin):
list_filter = ('until',)
fields = ('name', 'description', 'photo', 'permissions',
'since', 'until',)
def get_queryset(self, request):
qs = super().get_queryset(request)
return qs.exclude(board__is_board=True)
@admin.register(models.Board)
class BoardAdmin(admin.ModelAdmin):
class BoardAdmin(TranslatedModelAdmin):
exclude = ('is_board',)
fields = ('name', 'description', 'photo', 'permissions',
'since', 'until',)
@admin.register(models.CommitteeMembership)
class CommitteeMembershipAdmin(admin.ModelAdmin):
class CommitteeMembershipAdmin(TranslatedModelAdmin):
pass
......
from django.apps import AppConfig
class CommitteesConfig(AppConfig):
name = 'committees'
class ActiveMembersConfig(AppConfig):
name = 'activemembers'
[
{
"model": "committees.committee",
"model": "activemembers.committee",
"pk": 1,
"fields": {
"name": "testcie1",
"description": "Test",
"name_nl": "testcie1",
"name_en": "testcie1",
"description_nl": "Test",
"description_en": "Test",
"photo": "Thom_Wiggers.jpg",
"permissions": [
25,
......@@ -14,11 +16,13 @@
}
},
{
"model": "committees.committee",
"model": "activemembers.committee",
"pk": 2,
"fields": {
"name": "testcie2",
"description": "testdesc2",
"name_nl": "testcie2",
"name_en": "testcie2",
"description_nl": "testdesc2",
"description_en": "testdesc2",
"photo": "Thom_Wiggers_4YRoxV3.jpg",
"permissions": []
}
......
......@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-09-05 10:26+0200\n"
"PO-Revision-Date: 2016-09-05 10:26+0100\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 <joost@joostrijneveld.nl>\n"
"Language-Team: \n"
"Language: nl\n"
......@@ -16,177 +16,199 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 1.6.10\n"
"X-Generator: Poedit 1.8.8\n"
#: models.py:40
#: models.py:41
msgid "Committee name"
msgstr ""
msgstr "Commissienaam"
#: models.py:45
#: models.py:46
msgid "Description"
msgstr ""
msgstr "Beschrijving"
#: models.py:49
#: models.py:50
msgid "Image"
msgstr ""
msgstr "Afbeelding"
#: models.py:62
#: models.py:63
msgid "permissions"
msgstr ""
msgstr "permissies"
#: models.py:67
#: models.py:68
msgid "founded in"
msgstr ""
msgstr "opgericht in"
#: models.py:73
#: models.py:74
msgid "existed until"
msgstr ""
msgstr "bestond tot"
#: models.py:78
#: models.py:79
msgid "contact email address"
msgstr ""
msgstr "contact e-mailadres"
#: models.py:87
#: models.py:88
msgid "committee"
msgstr ""
msgstr "commissie"
#: models.py:88
#: models.py:89 templates/activemembers/committee_index.html:6
msgid "committees"
msgstr ""
msgstr "commissies"
#: models.py:100
#: models.py:101
msgid "Is this a board"
msgstr ""
msgstr "Is dit een bestuur"
#: models.py:122
#: models.py:123
msgid "Member"
msgstr ""
msgstr "Lid"
#: models.py:128
#: models.py:129
msgid "Committee"
msgstr ""
msgstr "Commissie"
#: models.py:132
#: models.py:133
msgid "Committee member since"
msgstr ""
msgstr "Commissielid sinds"
#: models.py:133
#: models.py:134
msgid "The date this member joined the committee in this role"
msgstr ""
msgstr "De datum waarop deze persoon lid werd deze commissie in deze rol"
#: models.py:138
#: models.py:139
msgid "Committee member until"
msgstr ""
msgstr "Commissielid tot"
#: models.py:139
#: models.py:140
msgid "A member of this committee until this time (can't be in the future)."
msgstr ""
"De datum waarop deze persoon de commissie verliet (kan niet in de toekomst "
"liggen)"
#: models.py:146
#: models.py:147
msgid "Chair of the committee"
msgstr ""
msgstr "Voorzitter van de commissie"
#: models.py:147
#: models.py:148
msgid "There can only be one chair at a time!"
msgstr ""
msgstr "Er kan maar één voorzitter tegelijkertijd zijn!"
#: models.py:152
#: models.py:153
msgid "role"
msgstr ""
msgstr "rol"
#: models.py:153
#: models.py:154
msgid "The role of this member"
msgstr ""
msgstr "De rol van dit lid binnen de commissie"
#: models.py:176
#: models.py:177
msgid "Membership expiration date can't be in the future: '{}'"
msgstr ""
msgstr "Een lidmaatschap kan niet verlopen in de toekomst: ‘{]’"
#: models.py:182
#: models.py:183
msgid "End date can't be before start date"
msgstr ""
msgstr "De einddatum kan niet voor de startdatum liggen"
#: models.py:196
#: models.py:197
msgid "This committee already has a chair"
msgstr ""
msgstr "Deze commissie heeft al een voorzitter"
#: models.py:213
#: models.py:214
msgid "This member is already in the committee"
msgstr ""
msgstr "Deze persoon is al lid van deze commissie"
#: models.py:216
#: models.py:217
msgid "This member is already in the committee for this period"
msgstr ""
msgstr "Deze persoon is al lid van deze commissie in de aangegeven periode"
#: models.py:247
#: models.py:251
msgid "committee membership"
msgstr ""
msgstr "commissielidmaatschap"
#: models.py:248
#: models.py:252
msgid "committee memberships"
msgstr ""
msgstr "commissielidmaatschappen"
#: models.py:256
#: models.py:260
#, python-brace-format
msgid "Mentor introduction {year}"
msgstr "Mentor introductie {year}"
#: templates/committees/boards.html:4 templates/committees/boards.html:8
#: templates/activemembers/board_detail.html:4
#: templates/activemembers/board_index.html:3
#: templates/activemembers/board_index.html:6
msgid "Boards"
msgstr ""
msgstr "Besturen"
#: templates/committees/boards.html:14
#: templates/activemembers/board_detail.html:8
#: templates/activemembers/board_index.html:33
#: templates/activemembers/board_index.html:38
msgid "Board"
msgstr "Besturen"
#: templates/activemembers/board_detail.html:26
msgid "Board members"
msgstr "Bestuursleden"
#: templates/activemembers/board_detail.html:42
#: templates/activemembers/committee_detail.html:44
msgid "Chair"
msgstr "Voorzitter"
#: templates/activemembers/board_detail.html:59
msgid "This board doesn't have any members?"
msgstr "Dit bestuur heeft geen leden?"
#: 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=\"mailto:info@thalia.nu\">send them an "
"email</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=\"mailto:info@thalia.nu\">mailen</a>. Besturen van langer geleden "
"(eerder dan 2001), zijn op <a href=\"/board/oud-besturen\">deze pagina</a> "
"te vinden."
msgstr ""
"of <a href=\"mailto:info@thalia.nu\">mailen</a>."
#: templates/committees/boards.html:53
msgid "Board members"
msgstr ""
#: 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/boards.html:73
msgid "Chair"
msgstr ""
#: templates/activemembers/board_index.html:45
msgid "There are no boards!"
msgstr "Er zijn geen besturen!"
#: templates/committees/details.html:3 templates/committees/index.html:3
#: templates/committees/index.html:6
#: templates/activemembers/committee_detail.html:3
#: templates/activemembers/committee_index.html:3
msgid "Committees"
msgstr ""
msgstr "Commissies"
#: templates/committees/details.html:22
#: templates/activemembers/committee_detail.html:24
#, python-format
msgid "About the %(name)s"
msgstr ""
msgstr "Over de %(name)s"
#: templates/committees/details.html:26
#: templates/activemembers/committee_detail.html:28
msgid "Committee members"
msgstr ""
msgstr "Commissieleden"
#: templates/committees/details.html:34
msgid "Default avatar"
msgstr ""
#: templates/committees/details.html:42
msgid "Voorzitter"
msgstr ""
#: templates/committees/details.html:49
#: templates/activemembers/committee_detail.html:51
#, python-format
msgid "Committee member since: %(since)s"
msgstr ""
msgstr "Commissielid sinds: %(since)s"
#: templates/committees/details.html:59
#: templates/activemembers/committee_detail.html:61
msgid "This committee doesn't have any members?"
msgstr ""
msgstr "Deze commissie heeft geen leden?"
#: templates/committees/index.html:39
#: templates/activemembers/committee_index.html:39
msgid "There are no committees!"
msgstr ""
msgstr "Er zijn geen commissies!"
#~ msgid "Mentors {year}-{year_to}"
#~ msgstr "Mentoren {year}-{year_to}"
......@@ -9,7 +9,7 @@ import django.db.models.manager
class Migration(migrations.Migration):
replaces = [('committees', '0001_initial'), ('committees', '0002_committee_permissions'), ('committees', '0003_auto_20160707_1356'), ('committees', '0004_auto_20160707_1357'), ('committees', '0005_auto_20160707_1512'), ('committees', '0006_auto_20160707_1700')]
replaces = [('activemembers', '0001_initial'), ('activemembers', '0002_committee_permissions'), ('activemembers', '0003_auto_20160707_1356'), ('activemembers', '0004_auto_20160707_1357'), ('activemembers', '0005_auto_20160707_1512'), ('activemembers', '0006_auto_20160707_1700')]
initial = True
......@@ -35,7 +35,7 @@ class Migration(migrations.Migration):
('since', models.DateField(auto_now_add=True)),
('until', models.DateField()),
('chair', models.BooleanField()),
('committee', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='committees.Committee')),
('committee', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='activemembers.Committee')),
('member', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='members.Member')),
],
managers=[
......@@ -45,7 +45,7 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='committee',
name='members',
field=models.ManyToManyField(through='committees.CommitteeMembership', to='members.Member'),
field=models.ManyToManyField(through='activemembers.CommitteeMembership', to='members.Member'),
),
migrations.AddField(
model_name='committee',
......@@ -68,7 +68,7 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='committeemembership',
name='committee',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='committees.Committee', verbose_name='Committee'),
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='activemembers.Committee', verbose_name='Committee'),
),
migrations.AlterField(
model_name='committeemembership',
......
......@@ -10,7 +10,7 @@ import django.db.models.manager
class Migration(migrations.Migration):
dependencies = [
('committees', '0001_squashed_0006_auto_20160707_1700'),
('activemembers', '0001_squashed_0006_auto_20160707_1700'),
]
operations = [
......
......@@ -9,17 +9,17 @@ import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('committees', '0002_auto_20160713_1558'),
('activemembers', '0002_auto_20160713_1558'),
]
operations = [
migrations.CreateModel(
name='Board',
fields=[
('committee_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='committees.Committee')),
('committee_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='activemembers.Committee')),
('is_board', models.BooleanField(default=True, verbose_name='Is this a board')),
],
bases=('committees.committee',),
bases=('activemembers.committee',),
),
migrations.AddField(
model_name='committeemembership',
......
......@@ -8,7 +8,7 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('committees', '0003_auto_20160713_1700'),
('activemembers', '0003_auto_20160713_1700'),
]