foerderbarometer/README.md

92 lines
2.1 KiB
Markdown
Raw Normal View History

2020-09-21 13:31:02 +02:00
# 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.
2020-10-01 10:19:17 +02:00
## installation and development setup
ln -sr foerderbarometer/settings_development.py foerderbarometer/settings.py
2020-11-24 13:44:07 +01:00
build the database with
2020-11-23 17:16:03 +01:00
2020-11-24 13:49:37 +01:00
python3 manage.py migrate
2020-11-23 17:16:03 +01:00
2020-11-24 10:04:46 +01:00
create superuser account with
2020-11-24 13:49:37 +01:00
python3 manage.py createsuperuser
2020-11-24 10:04:46 +01:00
run the development server with
2020-11-24 13:49:37 +01:00
python3 manage.py runserver
2020-11-24 13:44:07 +01:00
2020-11-24 10:04:46 +01:00
access via
2020-11-24 13:52:12 +01:00
http://localhost:8000/
http://localhost:8000/intern/ (login required)
http://localhost:8000/admin/ (login reqiured)
2020-11-24 13:44:07 +01:00
## additional admin functionality
The admin page is the standard admin page delivered by django but with two additional functionalities:
- There is a new action "export to csv" with which you can export all Selected
entries to a csv file
- There is a new button in the bottom of every Project to "save as new"
2020-11-06 12:13:50 +01:00
## versions used in development
2020-10-01 10:19:17 +02:00
2023-10-25 12:17:08 +02:00
asgiref==3.2.10
Django==3.1.2
django-formtools==2.4
gunicorn==20.0.4
mysqlclient==2.1.1
sqlparse==0.4.3
whitenoise==6.2.0
asgiref==3.2.10
Authlib==1.2.1
certifi==2023.7.22
cffi==1.16.0
chardet==5.2.0
charset-normalizer==3.3.0
cryptography==41.0.4
idna==3.4
pycparser==2.21
pytz==2023.3.post1
requests==2.31.0
six==1.16.0
typing_extensions==4.8.0
urllib3==2.0.6
2020-11-06 12:11:38 +01:00
2020-11-23 17:16:03 +01:00
## testing
run some tests with
python3 manage.py test
2020-11-06 12:13:50 +01:00
## production setup
2020-11-06 12:11:38 +01:00
ln -sr foerderbarometer/settings_production.py foerderbarometer/settings.py
2020-11-06 12:11:38 +01:00
2020-11-09 16:04:36 +01:00
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:
2020-11-09 16:04:36 +01:00
python3 manage.py migrate
python3 manage.py collectstatic
2020-11-09 16:04:36 +01:00
2020-11-09 16:28:41 +01:00
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