Set all to Dutch

This commit is contained in:
Midgard 2020-07-22 17:43:50 +02:00
parent 5d5fcbaa1b
commit 769ba7e807
Signed by: midgard
GPG key ID: 511C112F1331BBB4
5 changed files with 15 additions and 15 deletions

View file

@ -110,9 +110,9 @@ AUTH_PASSWORD_VALIDATORS = [
# Internationalization
# https://docs.djangoproject.com/en/3.0/topics/i18n/
LANGUAGE_CODE = 'en-us'
LANGUAGE_CODE = 'nl-be'
TIME_ZONE = 'UTC'
TIME_ZONE = 'Europe/Brussels'
USE_I18N = True

View file

@ -6,9 +6,9 @@ from users.models import CustomUser
class Event(models.Model):
MORNING, AFTERNOON, EVENING = range(3)
TIME_SLOTS = {
MORNING: "Voormiddag",
AFTERNOON: "Namiddag",
EVENING: "Avond",
MORNING: "voormiddag",
AFTERNOON: "namiddag",
EVENING: "avond",
}
date = models.DateField()
time = models.IntegerField(choices=TIME_SLOTS.items(), default=MORNING)
@ -50,8 +50,8 @@ class EventRegistration(models.Model):
INTERESTED = "I"
ADMITTED = "A"
REGISTRATION_STATE = {
INTERESTED: "Op wachtlijst",
ADMITTED: "Bevestigd",
INTERESTED: "op wachtlijst",
ADMITTED: "bevestigd",
}
event = models.ForeignKey(Event, on_delete=models.CASCADE)
user = models.ForeignKey(CustomUser, on_delete=models.CASCADE)

View file

@ -5,7 +5,7 @@
{% block content %}
<ul>
{% for x in events %}
<li id="{{x.event.id}}">{{ x.event.date }} {{ x.event.time_str }}
<li id="{{x.event.id}}">{{ x.event.date|date:"d F Y" }}, {{ x.event.time_str }}
{% include "events/registrations.html" with event=x.event my_registration=x.my_registration %}
</li>
{% endfor %}

View file

@ -22,7 +22,7 @@
</li>
<li>
<a href="{% url 'users:profile' %}">
Profile
Profiel
</a>
</li>
</ul>
@ -35,13 +35,13 @@
</li>
<li>
<a href="{% url 'users:logout' %}">
Logout
Log out
</a>
</li>
{% else %}
<li>
<a href="{% url 'oauth:login' %}">
Login
Log in
</a>
</li>
{% endif %}

View file

@ -1,16 +1,16 @@
{% extends "base.html" %}
{% block title %}Profile{% endblock %}
{% block title %}Profiel{% endblock %}
{% block content %}
<h1>Profile</h1>
<h1>Profiel</h1>
{% if user.is_authenticated %}
<p>Username: {{ user.username }}</p>
<p>Gebruikersnaam: {{ user.username }}</p>
<form action="/user/profile" method="post">
{% csrf_token %}
{{ form }}
<input type="submit" value="Submit">
<input type="submit" value="Bijwerken">
</form>
{% else %}
<p>Niet ingelogd</p>