1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pyinventory_ynh.git synced 2024-09-03 20:16:09 +02:00

Add info about emails into README

https://github.com/YunoHost-Apps/pyinventory_ynh/issues/53 works out of the box ;)
This commit is contained in:
JensDiemer 2021-05-14 12:02:46 +02:00
parent 4ea54c8aab
commit 16c89ef3c4

View file

@ -22,7 +22,35 @@ Pull requests welcome ;)
## Settings and upgrades
Almost everything related to PyInventory's configuration is handled in a `"../conf/settings.py"` file.
You can edit the file `$final_path/local_settings.py` to enable or disable features.
You can edit the file `/opt/yunohost/pyinventory/local_settings.py` to enable or disable features.
Test sending emails:
```bash
ssh admin@yourdomain.tld
root@yunohost:~# cd /opt/yunohost/pyinventory/
root@yunohost:/opt/yunohost/pyinventory# source venv/bin/activate
(venv) root@yunohost:/opt/yunohost/pyinventory# ./manage.py sendtestemail --admins
```
Background info: Error mails are send to all [settings.ADMINS](https://docs.djangoproject.com/en/2.2/ref/settings/#std:setting-ADMINS). By default the YunoHost admin is inserted here.
To check current ADMINS run:
```bash
(venv) root@yunohost:/opt/yunohost/pyinventory# ./manage.py sendtestemail --admins
```
If you prefere to send error emails to a extrnal email address, just do something like this:
```bash
echo "ADMINS = (('Your Name', 'example@domain.tld'),)" >> /opt/yunohost/pyinventory/local_settings.py
```
To check the effective settings, run this:
```bash
(venv) root@yunohost:/opt/yunohost/pyinventory# ./manage.py diffsettings
```
# Miscellaneous