-
Notifications
You must be signed in to change notification settings - Fork 6
Configuration
Reimbursinator uses an SMTP email server to send completed reports to both administrators and users. By default these settings are set up to use a gmail account, and are separated from the Django settings file and stored in the back/.env environment file loaded automatically when pipenv starts.
If using a gmail account, the file's variables are entered as follows:
EMAIL_HOST_USER is the gmail address of the account you will use to send emails from Reimbursinator.
EMAIL_HOST_PASSWORD is the password of the gmail account
SUBMIT_REPORT_DESTINATION_EMAIL is the email address to which you would like completed reports to be sent.
SUBMIT_REPORT_FROM_EMAIL is the address reports will appear to be sent from.
The .env file can be skipped entirely if you don't plan to use pipenv or wish to enter values manually.
"To:" and "From:" addresses are set in the back/backend/view.py file within the send_report_to_admin function. Email server configuration can be found in the back/reimbursinator/settings.py file under the # Email config section.
This project comes with Django configured to allow cross-origin resource sharing with certain hosts. This should be configured to reflect the host or hosts which will be serving the front end content.
This is configured in back/reimbursinator/settings.py as follows:
CORS_ORIGIN_WHITELIST = (
'localhost:8443',
'192.168.99.100:8443',
'127.0.0.1:8443',
)
Allow-all option and other settings are available at the django-cors-headers project page
The Django administration interface uses CSS and JS files served from a static folder. In this project's Docker configuration these files are served from the admin/ container using nginx on port 8445. To configure Django to use this setup, change the following line in back/reimbursinator/settings.py to match the address of the server.
STATIC_URL = https://192.168.99.100:8445