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 # Internationalization
# https://docs.djangoproject.com/en/3.0/topics/i18n/ # 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 USE_I18N = True

View file

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

View file

@ -5,7 +5,7 @@
{% block content %} {% block content %}
<ul> <ul>
{% for x in events %} {% 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 %} {% include "events/registrations.html" with event=x.event my_registration=x.my_registration %}
</li> </li>
{% endfor %} {% endfor %}

View file

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

View file

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