django-for-runners_ynh/doc/ADMIN.md

61 lines
4 KiB
Markdown
Raw Permalink Normal View History

2023-11-26 13:06:24 +01:00
## Settings and upgrades
Almost everything related to django-for-runners's configuration is handled in a `"../conf/settings.py"` file.
2023-11-26 21:01:26 +01:00
You can edit the file `/home/yunohost.app/django_example/local_settings.py` to enable or disable features.
2023-11-26 13:06:24 +01:00
Test sending emails, e.g.:
```bash
ssh admin@yourdomain.tld
root@yunohost:~# /home/yunohost.app/django_for_runners/manage.py sendtestemail --admins
```
How to debug a django YunoHost app, take a look into:
2023-11-26 21:01:26 +01:00
* https://github.com/YunoHost-Apps/django-for-runners_ynh#developer-info
## local test
For quicker developing of for_runners_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.:
```bash
~$ git clone https://github.com/YunoHost-Apps/django_example.git
~$ cd for_runners_ynh/
~/django_example$ ./dev-cli.py --help
```
The output will looks like:
[comment]: <> (✂✂✂ auto generated help start ✂✂✂)
```
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 │
2024-08-02 19:56:45 +02:00
│ coverage Run tests and show coverage report. │
2023-11-26 21:01:26 +01:00
│ diffsettings Run "diffsettings" manage command against a "local_test" YunoHost │
│ installation. │
2024-08-02 17:01:38 +02:00
│ fix-code-style Fix code style of all your_cool_package source code files via darker │
2023-11-26 21:01:26 +01:00
│ install Run pip-sync and install 'for_runners_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) │
2024-08-02 17:01:38 +02:00
│ pip-audit Run pip-audit check against current requirements files │
2023-11-26 21:01:26 +01:00
│ publish Build and upload this project to PyPi │
│ 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 │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
```
[comment]: <> (✂✂✂ auto generated help end ✂✂✂)