Skip to content
Snippets Groups Projects
Commit 22b44237 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Correct datetime in emails (issue #19)

parent e2f158bc
No related branches found
No related tags found
1 merge request!86Merge school-apps
......@@ -2,6 +2,7 @@ from django.contrib.auth.decorators import login_required, permission_required
from django.shortcuts import render, redirect, get_object_or_404
from django.urls import reverse
from django.utils import timezone
from django.utils import formats
from .apps import AubConfig
from dashboard.models import Activity, register_notification
......@@ -110,8 +111,8 @@ def check2(request):
# Notify user
register_notification(title="Ihr Antrag auf Unterrichtsbefreiung wurde genehmigt",
description="Ihr Antrag auf Unterrichtsbefreiung vom {} bis {} wurde von der Schulleitung genehmigt.".format(
aub.from_dt,
aub.to_dt),
formats.date_format(aub.from_dt),
formats.date_format(aub.to_dt)),
app=AubConfig.verbose_name, user=aub.created_by,
link=reverse('aub_details', args=[aub.id]))
elif 'deny' in request.POST:
......@@ -121,8 +122,8 @@ def check2(request):
# Notify user
register_notification(title="Ihr Antrag auf Unterrichtsbefreiung wurde abgelehnt",
description="Ihr Antrag auf Unterrichtsbefreiung vom {} bis {} wurde von der Schulleitung abgelehnt. Für weitere Informationen kontaktieren Sie bitte die Schulleitung.".format(
aub.from_dt,
aub.to_dt),
formats.date_format(aub.from_dt),
formats.date_format(aub.to_dt)),
app=AubConfig.verbose_name, user=aub.created_by,
link=reverse('aub_details', args=[aub.id]))
......
......@@ -3,7 +3,7 @@ from . import views
urlpatterns = [
path('', views.index, name='dashboard'),
path('test/', views.error_404, name='error_404'),
path('test/', views.test_notification, name='test'),
path('impress/', views.impress, name='impress')
]
......@@ -3,6 +3,7 @@ EMAIL_HOST = 'postoffice.katharineum.de'
EMAIL_PORT = 587
EMAIL_HOST_USER = 'infoplan@katharineum.de'
EMAIL_HOST_PASSWORD = 'grummelPASS1531'
EMAIL_USE_TLS = True
# SECRET KEY
SECRET_KEY = '_89lg!56$d^sf$22cz1ja_f)x9z(nc*y-x*@j4!!vzmlgi*53u'
......
......@@ -25,7 +25,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Provided by secure_settings
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
DEBUG = True
ALLOWED_HOSTS = [
'info.katharineum.de',
......@@ -148,8 +148,8 @@ STATICFILES_DIRS = [
# EMAIL
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
# EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' # Only for DEBUG
# Email settings provided by secure_settings
EMAIL_USE_TLS = True
# TIMETABLE
TIMETABLE_WIDTH = 5
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment