Set all to Dutch
This commit is contained in:
parent
5d5fcbaa1b
commit
769ba7e807
5 changed files with 15 additions and 15 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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 %}
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in a new issue