1
0
Fork 0
Go to file
Benni Bärmann 6b21066173 more finetuning in BusinessCards 2020-11-18 16:31:55 +01:00
foerderbarometer removed SECRET_KEY from production settings, must be provides in 2020-11-17 13:23:07 +01:00
input more finetuning in BusinessCards 2020-11-18 16:31:55 +01:00
.gitignore settings removed. symlink should be used. README adjusted. 2020-11-12 12:05:28 +01:00
LICENSE Initial commit 2020-09-21 11:31:02 +00:00
README.md removed SECRET_KEY from production settings, must be provides in 2020-11-17 13:23:07 +01:00
manage.py new django project 2020-09-21 14:27:16 +02:00

README.md

foerderbarometer

purpose: gather data from intern(WMDE) and extern(volunteers) forms to create a database ('förderdatenbank') and send emails with links for a questionary.

installation and development setup

ln -sr foerderbarometer/settings_development.py foerderbarometer/settings.py

run the development server with

python3 manage.py runserver

versions used in development

python 3.8.2
django 3.1.1
django-formtools 2.2
whitenoise 5.2.0
gunicorn 20.0.4

production setup

ln -sr foerderbarometer/settings_production.py foerderbarometer/settings.py

edit /secrets.json to contain something similar to

{
  "DATABASE_PASSWORD": "THIS IS TOP SECRET!",
  "SECRET_KEY": "THIS IS ANOTHER SECRET!"
}

edit foerderbarometer/settings_production.py according to your database setup (tested with MariaDB 10.0.36)

run the following commands:

python3 manage.py makemigrations
python3 manage.py migrate
python3 manage.py collectstatic

add to cron at least one time a day:

python3 manage.py sendmails

server starts with

nohup gunicorn --forwarded-allow-ips="*" -b '0:8000' foerderbarometer.wsgi 2&> logfile &

Should be executed at least daily e.g. in crontab

python3 manage.py sendmails