1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pyinventory_ynh.git synced 2024-09-03 20:16:09 +02:00
pyinventory_ynh/doc/ADMIN.md
2023-11-26 20:34:24 +01:00

4 KiB

Settings and upgrades

Almost everything related to PyInventory's configuration is handled in a "../conf/settings.py" file. You can edit the file /home/yunohost.app/django_example/local_settings.py to enable or disable features.

Test sending emails, e.g.:

ssh admin@yourdomain.tld
root@yunohost:~# /home/yunohost.app/pyinventory/manage.py sendtestemail --admins

How to debug a django YunoHost app, take a look into:

local test

For quicker developing of pyinventory_ynh in the context of YunoHost app, it's possible to run the Django developer server with the settings and urls made for YunoHost installation.

e.g.:

~$ git clone https://github.com/YunoHost-Apps/django_example.git
~$ cd pyinventory_ynh/
~/django_example$ ./dev-cli.py --help

The output will looks like:

Usage: ./dev-cli.py [OPTIONS] COMMAND [ARGS]...

╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --help      Show this message and exit.                                                          │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────╮
│ check-code-style            Check code style by calling darker + flake8                          │
│ coverage                    Run and show coverage.                                               │
│ diffsettings                Run "diffsettings" manage command against a "local_test" YunoHost    │
│                             installation.                                                        │
│ fix-code-style              Fix code style of all pyinventory_ynh source code files via darker   │
│ install                     Run pip-sync and install 'pyinventory_ynh' via pip as editable.      │
│ local-test                  Build a "local_test" YunoHost installation and start the Django dev. │
│                             server against it.                                                   │
│ mypy                        Run Mypy (configured in pyproject.toml)                              │
│ publish                     Build and upload this project to PyPi                                │
│ safety                      Run safety check against current requirements files                  │
│ test                        Compile YunoHost files and run Django unittests                      │
│ tox                         Run tox                                                              │
│ update                      Update "requirements*.txt" dependencies files                        │
│ update-test-snapshot-files  Update all test snapshot files (by remove and recreate all snapshot  │
│                             files)                                                               │
│ version                     Print version and exit                                               │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯