added some adresses, settings and documentation

This commit is contained in:
Benni Bärmann 2021-04-07 13:56:45 +02:00
parent d6e0f93312
commit 6cbfc03411
5 changed files with 42 additions and 9 deletions

View File

@ -23,3 +23,30 @@ environment managing tool
- start your development server with
python manage.py runserver
# production
- you can use gunicorn as server for example instead of the django development server.
- we use whitenoise for serving static files
- we still use the development SQLITE database from django
do the following in the project main directory:
ln -sr eva/settings_production.py eva/settings.py
edit /secrets.json to contain something similar to
{
"SECRET_KEY": "THIS IS ANOTHER SECRET!"
}
run the following commands:
python3 manage.py migrate
python3 manage.py collectstatic
server starts with
nohup gunicorn --forwarded-allow-ips="*" -b '0:8000' eva.wsgi 2&> logfile &

6
TODO
View File

@ -2,8 +2,6 @@ known bugs:
html problem in mails: 14" -> 14"
evapp/settings auf die richtigen adressen setzen
adresse fürs finanzteam fehlt noch
Accounts klären (OTRS und co. was genau muss in die liste)
whitenoise/gunicorn in production
staticfiles wollen nicht in production

View File

@ -25,7 +25,7 @@ EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
SECRET_KEY = 'g%+i6+gkwt3zz@+k-5x1dtstuw4)&qd$lxd^bt2oswy5e1#dul'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
DEBUG = False
# send mails only to debug mode adress even if in production
MAILTEST = True
@ -51,6 +51,7 @@ INSTALLED_APPS = [
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',

View File

@ -79,6 +79,7 @@ INSTALLED_APPS = [
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',

View File

@ -10,7 +10,7 @@ BASIC_DATA = ['usermail', 'firstname', 'lastname', 'firstdate_employment', 'firs
# for every department: 'MAIL' => mail adress, 'DATA': additional fields to include
MAILS = {
'IT': {
'MAIL': 'it@wikimedia.de',
'MAIL': 'wmde-it@wikimedia.de',
'DATA': [
'laptop', 'os', 'comment', 'email', 'landline', 'lists', 'mobile',
'department', 'accounts', 'language', 'screen', 'remote', 'desk',
@ -28,20 +28,26 @@ MAILS = {
'DATA': ['rebu2go',],
},
'KOMM': {
'MAIL': 'kom@wikimedia.de',
'MAIL': 'presse@wikimedia.de',
'DATA': [
'department', 'team',
'jobdescription_german', 'jobdescription_english',
],
},
'SPECIAL': {
'MAIL': 'eileen.miedtank@wikimedia.de',
'DATA': [
'department', 'team', 'language', 'sim', 'sim2',
],
},
'HR': {
'MAIL': 'hr@wikimedia.de',
'MAIL': 'personal@wikimedia.de, eileen.miedtank@wikimedia.de',
'DATA': [
'department', 'team', 'language',
]
},
'DIRECTORAT': {
'MAIL': 'vorstand@wikmedia.de',
'MAIL': 'ricarda.busse@wikimedia.de',
'DATA': [
'team', 'department', 'language',
]