mirror of
https://github.com/YunoHost-Apps/django-fritzconnection_ynh.git
synced 2024-09-03 18:26:24 +02:00
commit
6be43dd759
32 changed files with 1011 additions and 928 deletions
|
@ -10,7 +10,7 @@ trim_trailing_whitespace = true
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
|
|
||||||
[*.py]
|
[*.py]
|
||||||
line_length = 119
|
max_line_length = 100
|
||||||
|
|
||||||
[{Makefile,**.mk}]
|
[{Makefile,**.mk}]
|
||||||
indent_style = tab
|
indent_style = tab
|
||||||
|
@ -18,4 +18,3 @@ insert_final_newline = false
|
||||||
|
|
||||||
[*.yml]
|
[*.yml]
|
||||||
indent_style = tab
|
indent_style = tab
|
||||||
indent_size = 4
|
|
||||||
|
|
14
.github/workflows/pytest.yml
vendored
14
.github/workflows/pytest.yml
vendored
|
@ -27,6 +27,11 @@ jobs:
|
||||||
with:
|
with:
|
||||||
python-version: '${{ matrix.python-version }}'
|
python-version: '${{ matrix.python-version }}'
|
||||||
|
|
||||||
|
- uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ~/.cache/
|
||||||
|
key: dot-cache-files
|
||||||
|
|
||||||
- name: 'Install package'
|
- name: 'Install package'
|
||||||
run: |
|
run: |
|
||||||
pip3 install poetry
|
pip3 install poetry
|
||||||
|
@ -40,5 +45,12 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
make pytest
|
make pytest
|
||||||
|
|
||||||
|
- name: 'Run Safety check'
|
||||||
|
run: |
|
||||||
|
make safety
|
||||||
|
|
||||||
- name: 'Upload coverage report'
|
- name: 'Upload coverage report'
|
||||||
run: bash <(curl -s https://codecov.io/bash)
|
uses: codecov/codecov-action@v2
|
||||||
|
with:
|
||||||
|
fail_ci_if_error: false
|
||||||
|
verbose: true
|
||||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -3,6 +3,7 @@
|
||||||
!.editorconfig
|
!.editorconfig
|
||||||
!.flake8
|
!.flake8
|
||||||
!.gitignore
|
!.gitignore
|
||||||
|
!/doc/screenshots/.gitkeep
|
||||||
__pycache__
|
__pycache__
|
||||||
secret.txt
|
secret.txt
|
||||||
/local_test/
|
/local_test/
|
||||||
|
|
17
Makefile
17
Makefile
|
@ -1,5 +1,5 @@
|
||||||
SHELL := /bin/bash
|
SHELL := /bin/bash
|
||||||
MAX_LINE_LENGTH := 119
|
MAX_LINE_LENGTH := 100
|
||||||
|
|
||||||
all: help
|
all: help
|
||||||
|
|
||||||
|
@ -17,24 +17,21 @@ check-poetry:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
install-poetry: ## install or update poetry
|
install-poetry: ## install or update poetry
|
||||||
pip3 install -U pip
|
curl -sSL https://install.python-poetry.org | python3 -
|
||||||
pip3 install -U poetry
|
|
||||||
|
|
||||||
install: check-poetry ## install project via poetry
|
install: check-poetry ## install project via poetry
|
||||||
poetry install
|
poetry install
|
||||||
|
|
||||||
update: install-poetry ## update the sources and installation and generate "conf/requirements.txt"
|
update: check-poetry ## update the sources and installation and generate "conf/requirements.txt"
|
||||||
poetry run pip install -U pip
|
poetry self update
|
||||||
poetry update
|
poetry update -v
|
||||||
poetry export -f requirements.txt --output conf/requirements.txt
|
poetry export -f requirements.txt --output conf/requirements.txt
|
||||||
|
|
||||||
lint: ## Run code formatters and linter
|
lint: ## Run code formatters and linter
|
||||||
poetry run flynt --fail-on-change --line-length=${MAX_LINE_LENGTH} .
|
|
||||||
poetry run isort --check-only .
|
poetry run isort --check-only .
|
||||||
poetry run flake8 .
|
poetry run flake8 .
|
||||||
|
|
||||||
fix-code-style: ## Fix code formatting
|
fix-code-style: ## Fix code formatting
|
||||||
poetry run flynt --line-length=${MAX_LINE_LENGTH} .
|
|
||||||
poetry run black --verbose --safe --line-length=${MAX_LINE_LENGTH} --skip-string-normalization .
|
poetry run black --verbose --safe --line-length=${MAX_LINE_LENGTH} --skip-string-normalization .
|
||||||
poetry run isort .
|
poetry run isort .
|
||||||
|
|
||||||
|
@ -45,7 +42,7 @@ tox: check-poetry ## Run pytest via tox with all environments
|
||||||
poetry run tox
|
poetry run tox
|
||||||
|
|
||||||
pytest: install ## Run pytest
|
pytest: install ## Run pytest
|
||||||
poetry run python3 ./run_pytest.py
|
poetry run pytest
|
||||||
|
|
||||||
local-test: install ## Run local_test.py to run the project locally
|
local-test: install ## Run local_test.py to run the project locally
|
||||||
poetry run python3 ./local_test.py
|
poetry run python3 ./local_test.py
|
||||||
|
@ -53,6 +50,8 @@ local-test: install ## Run local_test.py to run the project locally
|
||||||
local-diff-settings: ## Run "manage.py diffsettings" with local test
|
local-diff-settings: ## Run "manage.py diffsettings" with local test
|
||||||
poetry run python3 local_test/opt_yunohost/manage.py diffsettings
|
poetry run python3 local_test/opt_yunohost/manage.py diffsettings
|
||||||
|
|
||||||
|
safety: ## Run https://github.com/pyupio/safety
|
||||||
|
poetry run safety check --full-report
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
|
|
23
README.md
23
README.md
|
@ -5,7 +5,7 @@ It shall NOT be edited by hand.
|
||||||
|
|
||||||
# django-fritzconnection for YunoHost
|
# django-fritzconnection for YunoHost
|
||||||
|
|
||||||
[![Integration level](https://dash.yunohost.org/integration/django-fritzconnection.svg)](https://dash.yunohost.org/appci/app/django-fritzconnection) ![](https://ci-apps.yunohost.org/ci/badges/django-fritzconnection.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/django-fritzconnection.maintain.svg)
|
[![Integration level](https://dash.yunohost.org/integration/django-fritzconnection.svg)](https://dash.yunohost.org/appci/app/django-fritzconnection) ![Working status](https://ci-apps.yunohost.org/ci/badges/django-fritzconnection.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/django-fritzconnection.maintain.svg)
|
||||||
[![Install django-fritzconnection with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=django-fritzconnection)
|
[![Install django-fritzconnection with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=django-fritzconnection)
|
||||||
|
|
||||||
*[Lire ce readme en français.](./README_fr.md)*
|
*[Lire ce readme en français.](./README_fr.md)*
|
||||||
|
@ -31,14 +31,14 @@ Pull requests welcome ;)
|
||||||
This package for YunoHost used [django-yunohost-integration](https://github.com/YunoHost-Apps/django_yunohost_integration)
|
This package for YunoHost used [django-yunohost-integration](https://github.com/YunoHost-Apps/django_yunohost_integration)
|
||||||
|
|
||||||
|
|
||||||
**Shipped version:** 0.2.0~ynh1
|
**Shipped version:** 0.2.0~ynh2 *(:warning: This is the `dev` branch. The [`master` branch](https://github.com/YunoHost-Apps/django-fritzconnection_ynh/tree/master) used in the catalog is currently on version 0.2.0\~ynh1.)*
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||
![](./doc/screenshots/v002_hosts_change_list.png)
|
![Screenshot of django-fritzconnection](./doc/screenshots/v002_hosts_change_list.png)
|
||||||
![](./doc/screenshots/v010rc1_group_management.png)
|
![Screenshot of django-fritzconnection](./doc/screenshots/gitkeep)
|
||||||
|
![Screenshot of django-fritzconnection](./doc/screenshots/v010rc1_group_management.png)
|
||||||
|
|
||||||
## Disclaimers / important information
|
## Disclaimers / important information
|
||||||
|
|
||||||
|
@ -173,20 +173,21 @@ Notes:
|
||||||
|
|
||||||
## Documentation and resources
|
## Documentation and resources
|
||||||
|
|
||||||
* Official app website: https://github.com/jedie/django-fritzconnection
|
* Official app website: <https://github.com/jedie/django-fritzconnection>
|
||||||
* Upstream app code repository: https://github.com/jedie/django-fritzconnection
|
* Upstream app code repository: <https://github.com/jedie/django-fritzconnection>
|
||||||
* YunoHost documentation for this app: https://yunohost.org/app_django-fritzconnection
|
* YunoHost documentation for this app: <https://yunohost.org/app_django-fritzconnection>
|
||||||
* Report a bug: https://github.com/YunoHost-Apps/django-fritzconnection_ynh/issues
|
* Report a bug: <https://github.com/YunoHost-Apps/django-fritzconnection_ynh/issues>
|
||||||
|
|
||||||
## Developer info
|
## Developer info
|
||||||
|
|
||||||
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/django-fritzconnection_ynh/tree/testing).
|
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/django-fritzconnection_ynh/tree/testing).
|
||||||
|
|
||||||
To try the testing branch, please proceed like that.
|
To try the testing branch, please proceed like that.
|
||||||
```
|
|
||||||
|
``` bash
|
||||||
sudo yunohost app install https://github.com/YunoHost-Apps/django-fritzconnection_ynh/tree/testing --debug
|
sudo yunohost app install https://github.com/YunoHost-Apps/django-fritzconnection_ynh/tree/testing --debug
|
||||||
or
|
or
|
||||||
sudo yunohost app upgrade django-fritzconnection -u https://github.com/YunoHost-Apps/django-fritzconnection_ynh/tree/testing --debug
|
sudo yunohost app upgrade django-fritzconnection -u https://github.com/YunoHost-Apps/django-fritzconnection_ynh/tree/testing --debug
|
||||||
```
|
```
|
||||||
|
|
||||||
**More info regarding app packaging:** https://yunohost.org/packaging_apps
|
**More info regarding app packaging:** <https://yunohost.org/packaging_apps>
|
||||||
|
|
29
README_fr.md
29
README_fr.md
|
@ -1,10 +1,14 @@
|
||||||
|
<!--
|
||||||
|
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
|
||||||
|
It shall NOT be edited by hand.
|
||||||
|
-->
|
||||||
|
|
||||||
# django-fritzconnection pour YunoHost
|
# django-fritzconnection pour YunoHost
|
||||||
|
|
||||||
[![Niveau d'intégration](https://dash.yunohost.org/integration/django-fritzconnection.svg)](https://dash.yunohost.org/appci/app/django-fritzconnection) ![](https://ci-apps.yunohost.org/ci/badges/django-fritzconnection.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/django-fritzconnection.maintain.svg)
|
[![Niveau d'intégration](https://dash.yunohost.org/integration/django-fritzconnection.svg)](https://dash.yunohost.org/appci/app/django-fritzconnection) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/django-fritzconnection.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/django-fritzconnection.maintain.svg)
|
||||||
[![Installer django-fritzconnection avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=django-fritzconnection)
|
[![Installer django-fritzconnection avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=django-fritzconnection)
|
||||||
|
|
||||||
*[Read this readme in english.](./README.md)*
|
*[Read this readme in english.](./README.md)*
|
||||||
*[Lire ce readme en français.](./README_fr.md)*
|
|
||||||
|
|
||||||
> *Ce package vous permet d'installer django-fritzconnection rapidement et simplement sur un serveur YunoHost.
|
> *Ce package vous permet d'installer django-fritzconnection rapidement et simplement sur un serveur YunoHost.
|
||||||
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
|
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
|
||||||
|
@ -27,14 +31,14 @@ Pull requests welcome ;)
|
||||||
This package for YunoHost used [django-yunohost-integration](https://github.com/YunoHost-Apps/django_yunohost_integration)
|
This package for YunoHost used [django-yunohost-integration](https://github.com/YunoHost-Apps/django_yunohost_integration)
|
||||||
|
|
||||||
|
|
||||||
**Version incluse :** 0.2.0~ynh1
|
**Version incluse :** 0.2.0~ynh2 *(:warning: Il s'agit de la branche `dev`. La [branche `master`](https://github.com/YunoHost-Apps/django-fritzconnection_ynh/tree/master) utilisée dans le catalogue est actuellement en 0.2.0\~ynh1.)*
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Captures d'écran
|
## Captures d'écran
|
||||||
|
|
||||||
![](./doc/screenshots/v002_hosts_change_list.png)
|
![Capture d'écran de django-fritzconnection](./doc/screenshots/v002_hosts_change_list.png)
|
||||||
![](./doc/screenshots/v010rc1_group_management.png)
|
![Capture d'écran de django-fritzconnection](./doc/screenshots/gitkeep)
|
||||||
|
![Capture d'écran de django-fritzconnection](./doc/screenshots/v010rc1_group_management.png)
|
||||||
|
|
||||||
## Avertissements / informations importantes
|
## Avertissements / informations importantes
|
||||||
|
|
||||||
|
@ -169,20 +173,21 @@ Notes:
|
||||||
|
|
||||||
## Documentations et ressources
|
## Documentations et ressources
|
||||||
|
|
||||||
* Site officiel de l'app : https://github.com/jedie/django-fritzconnection
|
* Site officiel de l'app : <https://github.com/jedie/django-fritzconnection>
|
||||||
* Dépôt de code officiel de l'app : https://github.com/jedie/django-fritzconnection
|
* Dépôt de code officiel de l'app : <https://github.com/jedie/django-fritzconnection>
|
||||||
* Documentation YunoHost pour cette app : https://yunohost.org/app_django-fritzconnection
|
* Documentation YunoHost pour cette app : <https://yunohost.org/app_django-fritzconnection>
|
||||||
* Signaler un bug : https://github.com/YunoHost-Apps/django-fritzconnection_ynh/issues
|
* Signaler un bug : <https://github.com/YunoHost-Apps/django-fritzconnection_ynh/issues>
|
||||||
|
|
||||||
## Informations pour les développeurs
|
## Informations pour les développeurs
|
||||||
|
|
||||||
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/django-fritzconnection_ynh/tree/testing).
|
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/django-fritzconnection_ynh/tree/testing).
|
||||||
|
|
||||||
Pour essayer la branche testing, procédez comme suit.
|
Pour essayer la branche testing, procédez comme suit.
|
||||||
```
|
|
||||||
|
``` bash
|
||||||
sudo yunohost app install https://github.com/YunoHost-Apps/django-fritzconnection_ynh/tree/testing --debug
|
sudo yunohost app install https://github.com/YunoHost-Apps/django-fritzconnection_ynh/tree/testing --debug
|
||||||
ou
|
ou
|
||||||
sudo yunohost app upgrade django-fritzconnection -u https://github.com/YunoHost-Apps/django-fritzconnection_ynh/tree/testing --debug
|
sudo yunohost app upgrade django-fritzconnection -u https://github.com/YunoHost-Apps/django-fritzconnection_ynh/tree/testing --debug
|
||||||
```
|
```
|
||||||
|
|
||||||
**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps
|
**Plus d'infos sur le packaging d'applications :** <https://yunohost.org/packaging_apps>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
setup_sub_dir=1
|
setup_sub_dir=1
|
||||||
setup_root=1
|
setup_root=1
|
||||||
setup_nourl=0
|
setup_nourl=0
|
||||||
setup_private=1
|
setup_private=0
|
||||||
setup_public=1
|
setup_public=1
|
||||||
upgrade=1
|
upgrade=1
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
|
|
|
@ -17,4 +17,4 @@ accesslog = '__LOG_FILE__'
|
||||||
errorlog = '__LOG_FILE__'
|
errorlog = '__LOG_FILE__'
|
||||||
|
|
||||||
# https://docs.gunicorn.org/en/latest/settings.html#pidfile
|
# https://docs.gunicorn.org/en/latest/settings.html#pidfile
|
||||||
pidfile = '__FINAL_HOME_PATH__/gunicorn.pid'
|
pidfile = '__FINALPATH__/gunicorn.pid'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!__FINAL_HOME_PATH__/venv/bin/python
|
#!__FINALPATH__/venv/bin/python
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
|
@ -1,17 +1,11 @@
|
||||||
|
|
||||||
location __PATH__/static/ {
|
location __PATH__/static/ {
|
||||||
# Django static files
|
# Service static files by nginx
|
||||||
|
# e.g.: /var/www/$app/static
|
||||||
alias __PUBLIC_PATH__/static/;
|
alias __PUBLIC_PATH__/static/;
|
||||||
expires 30d;
|
expires 30d;
|
||||||
}
|
}
|
||||||
|
|
||||||
# TODO: django-sendfile2:
|
|
||||||
#location __PATH__/media/ {
|
|
||||||
# # DATA_DIR/media/
|
|
||||||
# alias __PUBLIC_PATH__/media/;
|
|
||||||
# expires 30d;
|
|
||||||
#}
|
|
||||||
|
|
||||||
location __PATH__/ {
|
location __PATH__/ {
|
||||||
# https://github.com/benoitc/gunicorn/blob/master/examples/nginx.conf
|
# https://github.com/benoitc/gunicorn/blob/master/examples/nginx.conf
|
||||||
|
|
||||||
|
|
|
@ -1,199 +1,201 @@
|
||||||
asgiref==3.5.1; python_version >= "3.7" and python_full_version < "4.0.0" \
|
asgiref==3.5.2 ; python_version >= "3.7" and python_full_version < "4.0.0" \
|
||||||
--hash=sha256:45a429524fba18aba9d512498b19d220c4d628e75b40cf5c627524dbaebc5cc1 \
|
--hash=sha256:1d2880b792ae8757289136f1db2b7b99100ce959b2aa57fd69dab783d05afac4 \
|
||||||
--hash=sha256:fddeea3c53fa99d0cdb613c3941cc6e52d822491fc2753fba25768fb5bf4e865
|
--hash=sha256:4a29362a6acebe09bf1d6640db38c1dc3d9217c68e6f9f6204d72667fc19a424
|
||||||
async-timeout==4.0.2; python_version >= "3.7" and python_full_version < "4.0.0" \
|
async-timeout==4.0.2 ; python_version >= "3.7" and python_full_version < "4.0.0" \
|
||||||
--hash=sha256:2163e1640ddb52b7a8c80d0a67a08587e5d245cc9c553a74a847056bc2976b15 \
|
--hash=sha256:2163e1640ddb52b7a8c80d0a67a08587e5d245cc9c553a74a847056bc2976b15 \
|
||||||
--hash=sha256:8ca1e4fcf50d07413d66d1a5e416e42cfdf5851c981d679a09851a6853383b3c
|
--hash=sha256:8ca1e4fcf50d07413d66d1a5e416e42cfdf5851c981d679a09851a6853383b3c
|
||||||
bleach==5.0.0; python_version >= "3.7" and python_full_version < "4.0.0" \
|
bleach==5.0.1 ; python_version >= "3.7" and python_full_version < "4.0.0" \
|
||||||
--hash=sha256:08a1fe86d253b5c88c92cc3d810fd8048a16d15762e1e5b74d502256e5926aa1 \
|
--hash=sha256:085f7f33c15bd408dd9b17a4ad77c577db66d76203e5984b1bd59baeee948b2a \
|
||||||
--hash=sha256:c6d6cc054bdc9c83b48b8083e236e5f00f238428666d2ce2e083eaa5fd568565
|
--hash=sha256:0d03255c47eb9bd2f26aa9bb7f2107732e7e8fe195ca2f64709fcf3b0a4a085c
|
||||||
bx-django-utils==21; python_version >= "3.7" and python_full_version < "4.0.0" \
|
bx-django-utils==35 ; python_version >= "3.7" and python_full_version < "4.0.0" \
|
||||||
--hash=sha256:414ada254464b6db851a4eed20460e3d6d78c749459419cbadc7341019d69379 \
|
--hash=sha256:341b27ad0b72a903acf2f28def0fe371def811c1b2305da9806124869a698fc8 \
|
||||||
--hash=sha256:ccd90e09c5f334d848508b9ba0fe1857291548cfb49a41cc56d3c78744773951
|
--hash=sha256:5151806d349a9dafc8dba9636239422022bab211b5b02afa52fce1f58ec2e6ab
|
||||||
bx-py-utils==61; python_version >= "3.6" and python_full_version < "4.0.0" \
|
bx-py-utils==69 ; python_version >= "3.7" and python_full_version < "4.0.0" \
|
||||||
--hash=sha256:8af6c2ab7396452f689441c4cf2ea2b26a7d3cc1349041e333ce441ca1c8261b \
|
--hash=sha256:728fd575c4d5048e114b502a97d19679f9abcda90889a6896534c48348320460 \
|
||||||
--hash=sha256:34be9906ad6629d28e2d22290de575a4a600a49625455ec758c8b02adadb44f2
|
--hash=sha256:b25419e020c9c5ea16938a45cf5120086a5ac29648be78a8eb98ae202515fee1
|
||||||
certifi==2021.10.8; python_version >= "3.7" and python_full_version < "3.0.0" or python_version >= "3.7" and python_full_version < "4.0.0" and python_full_version >= "3.6.0" \
|
certifi==2022.9.24 ; python_version >= "3.7" and python_version < "4" \
|
||||||
--hash=sha256:d62a0163eb4c2344ac042ab2bdf75399a71a2d8c7d47eac2e2ee91b9d6339569 \
|
--hash=sha256:0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14 \
|
||||||
--hash=sha256:78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872
|
--hash=sha256:90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382
|
||||||
charset-normalizer==2.0.12; python_version >= "3.7" and python_full_version < "4.0.0" and python_full_version >= "3.6.0" \
|
charset-normalizer==2.1.1 ; python_version >= "3.7" and python_version < "4" \
|
||||||
--hash=sha256:2857e29ff0d34db842cd7ca3230549d1a697f96ee6d3fb071cfa6c7393832597 \
|
--hash=sha256:5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845 \
|
||||||
--hash=sha256:6881edbebdb17b39b4eaaa821b438bf6eddffb4468cf344f09f89def34a8b1df
|
--hash=sha256:83e9a75d1911279afd89352c68b45348559d1fc0506b054b346651b5e7fee29f
|
||||||
colorama==0.4.4; python_version >= "3.7" and python_full_version < "3.0.0" and sys_platform == "win32" or python_version >= "3.7" and python_full_version < "4.0.0" and sys_platform == "win32" and python_full_version >= "3.5.0" \
|
colorama==0.4.5 ; python_version >= "3.7" and python_full_version < "4.0.0" and sys_platform == "win32" \
|
||||||
--hash=sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2 \
|
--hash=sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da \
|
||||||
--hash=sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b
|
--hash=sha256:e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4
|
||||||
colorlog==6.6.0; python_version >= "3.7" and python_full_version < "4.0.0" \
|
colorlog==6.7.0 ; python_version >= "3.7" and python_full_version < "4.0.0" \
|
||||||
--hash=sha256:351c51e866c86c3217f08e4b067a7974a678be78f07f85fc2d55b8babde6d94e \
|
--hash=sha256:0d33ca236784a1ba3ff9c532d4964126d8a2c44f1f0cb1d2b0728196f512f662 \
|
||||||
--hash=sha256:344f73204009e4c83c5b6beb00b3c45dc70fcdae3c80db919e0a4171d006fde8
|
--hash=sha256:bd94bd21c1e13fac7bd3153f4bc3a7dc0eb0974b8bc2fdf1a989e474f6e582e5
|
||||||
deprecated==1.2.13; python_version >= "3.7" and python_full_version < "3.0.0" or python_version >= "3.7" and python_full_version < "4.0.0" and python_full_version >= "3.4.0" \
|
deprecated==1.2.13 ; python_version >= "3.7" and python_full_version < "4.0.0" \
|
||||||
--hash=sha256:64756e3e14c8c5eea9795d93c524551432a0be75629f8f29e67ab8caf076c76d \
|
--hash=sha256:43ac5335da90c31c24ba028af536a91d41d53f9e6901ddb021bcc572ce44e38d \
|
||||||
--hash=sha256:43ac5335da90c31c24ba028af536a91d41d53f9e6901ddb021bcc572ce44e38d
|
--hash=sha256:64756e3e14c8c5eea9795d93c524551432a0be75629f8f29e67ab8caf076c76d
|
||||||
diff-match-patch==20200713; python_version >= "3.7" and python_full_version < "4.0.0" \
|
diff-match-patch==20200713 ; python_version >= "3.7" and python_full_version < "4.0.0" \
|
||||||
--hash=sha256:da6f5a01aa586df23dfc89f3827e1cafbb5420be9d87769eeb079ddfd9477a18 \
|
--hash=sha256:8bf9d9c4e059d917b5c6312bac0c137971a32815ddbda9c682b949f2986b4d34 \
|
||||||
--hash=sha256:8bf9d9c4e059d917b5c6312bac0c137971a32815ddbda9c682b949f2986b4d34
|
--hash=sha256:da6f5a01aa586df23dfc89f3827e1cafbb5420be9d87769eeb079ddfd9477a18
|
||||||
django-admin-sortable2==1.0.4; python_version >= "3.7" and python_full_version < "4.0.0" \
|
django-admin-sortable2==1.0.4 ; python_version >= "3.7" and python_full_version < "4.0.0" \
|
||||||
--hash=sha256:f96044003176c6684c5f969792ca833a505d654fa0f7b24232a0a610e4332a53 \
|
--hash=sha256:e22956889533b48a35a7f02859ae3a939753fa9a7d7d532cefc2835b41bdcebb \
|
||||||
--hash=sha256:e22956889533b48a35a7f02859ae3a939753fa9a7d7d532cefc2835b41bdcebb
|
--hash=sha256:f96044003176c6684c5f969792ca833a505d654fa0f7b24232a0a610e4332a53
|
||||||
django-axes==5.32.0; python_version >= "3.7" and python_full_version < "4.0.0" \
|
django-axes==5.39.0 ; python_version >= "3.7" and python_full_version < "4.0.0" \
|
||||||
--hash=sha256:e42c9a9c83489d795970784681ac221f60609ec22079f9def9990b8258d3db3b \
|
--hash=sha256:8f039f8e98f050f13f654efca599d8a04d0b57d330c590cf89ec2bf731c9a7fb \
|
||||||
--hash=sha256:02793a3b007ee1d6c71a0dfc2e165471d50fdf806bb29451bea85b4d70d6d099
|
--hash=sha256:97702552f7939c81db5bba2ef855ae43f20df92fa261cb79fd4c8633ba3b3955
|
||||||
django-debug-toolbar==3.4.0; python_version >= "3.7" and python_full_version < "4.0.0" \
|
django-debug-toolbar==3.7.0 ; python_version >= "3.7" and python_full_version < "4.0.0" \
|
||||||
--hash=sha256:ae6bec2c1ce0e6900b0ab0443e1427eb233d8e6f57a84a0b2705eeecb8874e22 \
|
--hash=sha256:1e3acad24e3d351ba45c6fa2072e4164820307332a776b16c9f06d1f89503465 \
|
||||||
--hash=sha256:42c1c2e9dc05bb57b53d641e3a6d131fc031b92377b34ae32e604a1fe439bb83
|
--hash=sha256:80de23066b624d3970fd296cf02d61988e5d56c31aa0dc4a428970b46e2883a8
|
||||||
django-fritzconnection==0.2.0; python_version >= "3.7" and python_full_version < "4.0.0" \
|
django-fritzconnection==0.2.0 ; python_version >= "3.7" and python_full_version < "4.0.0" \
|
||||||
--hash=sha256:5573ef7497fbd339e54c6067d9d7e223d820785d581cd5e6593af46c828a6425 \
|
--hash=sha256:4dbc96661da17cfa0f57ee6e6cc0956574d47479aa688eedf136475bf96f870e \
|
||||||
--hash=sha256:4dbc96661da17cfa0f57ee6e6cc0956574d47479aa688eedf136475bf96f870e
|
--hash=sha256:5573ef7497fbd339e54c6067d9d7e223d820785d581cd5e6593af46c828a6425
|
||||||
django-ipware==4.0.2; python_version >= "3.7" and python_full_version < "3.0.0" or python_version >= "3.7" and python_full_version < "4.0.0" and python_full_version >= "3.6.0" \
|
django-ipware==4.0.2 ; python_version >= "3.7" and python_full_version < "4.0.0" \
|
||||||
--hash=sha256:602a58325a4808bd19197fef2676a0b2da2df40d0ecf21be414b2ff48c72ad05 \
|
--hash=sha256:602a58325a4808bd19197fef2676a0b2da2df40d0ecf21be414b2ff48c72ad05 \
|
||||||
--hash=sha256:878dbb06a87e25550798e9ef3204ed70a200dd8b15e47dcef848cf08244f04c9
|
--hash=sha256:878dbb06a87e25550798e9ef3204ed70a200dd8b15e47dcef848cf08244f04c9
|
||||||
django-redis==5.2.0; python_version >= "3.7" and python_full_version < "4.0.0" \
|
django-redis==5.2.0 ; python_version >= "3.7" and python_full_version < "4.0.0" \
|
||||||
--hash=sha256:8a99e5582c79f894168f5865c52bd921213253b7fd64d16733ae4591564465de \
|
--hash=sha256:1d037dc02b11ad7aa11f655d26dac3fb1af32630f61ef4428860a2e29ff92026 \
|
||||||
--hash=sha256:1d037dc02b11ad7aa11f655d26dac3fb1af32630f61ef4428860a2e29ff92026
|
--hash=sha256:8a99e5582c79f894168f5865c52bd921213253b7fd64d16733ae4591564465de
|
||||||
django-reversion-compare==0.15.0; python_version >= "3.7" and python_full_version < "4.0.0" \
|
django-reversion-compare==0.15.0 ; python_version >= "3.7" and python_full_version < "4.0.0" \
|
||||||
--hash=sha256:ed0264a2852d9d867023f1874948b8234dad9c2d2fa22ea18cfd5f28f304d7a0 \
|
--hash=sha256:d6f37b106aec287ae17a076bb7db1184ab02ab1898f0e8693f2779fbdaf71697 \
|
||||||
--hash=sha256:d6f37b106aec287ae17a076bb7db1184ab02ab1898f0e8693f2779fbdaf71697
|
--hash=sha256:ed0264a2852d9d867023f1874948b8234dad9c2d2fa22ea18cfd5f28f304d7a0
|
||||||
django-reversion==5.0.0; python_version >= "3.7" and python_full_version < "4.0.0" \
|
django-reversion==5.0.3 ; python_version >= "3.7" and python_full_version < "4.0.0" \
|
||||||
--hash=sha256:0bade3c399387451087f0c67835e0d3d186d767de6a5c5ba53a88eafc3f271c8 \
|
--hash=sha256:acb600f8482147312a27bd58e63766aa0383310181e485e6eaa2f42d26502c9b \
|
||||||
--hash=sha256:7bea725de7f56769d89a5a712cf7b7f1b02abc27655432f2eb1a703264986d99
|
--hash=sha256:c5955e09c4f290a8a3c5048b3f77d5ba75eae325c0fb1e571b0cd98df6a0017b
|
||||||
django-tagulous==1.3.3; python_version >= "3.7" and python_full_version < "4.0.0" \
|
django-tagulous==1.3.3 ; python_version >= "3.7" and python_full_version < "4.0.0" \
|
||||||
--hash=sha256:d445590ae1b5cb9b8c5a425f97bf5f01148a33419c19edeb721ebd9fdd6792fe \
|
--hash=sha256:ad3bb85f4cce83a47e4c0257143229cb92a294defa02fe661823b0442b35d478 \
|
||||||
--hash=sha256:ad3bb85f4cce83a47e4c0257143229cb92a294defa02fe661823b0442b35d478
|
--hash=sha256:d445590ae1b5cb9b8c5a425f97bf5f01148a33419c19edeb721ebd9fdd6792fe
|
||||||
django-tools==0.49.0; python_version >= "3.7" and python_full_version < "4.0.0" \
|
django-tools==0.54.0 ; python_version >= "3.7" and python_full_version < "4.0.0" \
|
||||||
--hash=sha256:9da6d5610576a34219be3dea9c7c2207669e5c916d89987011843ded772ece0a \
|
--hash=sha256:5040a91282be9d1c9d379b0c65da50bcb3691bff03cee54fd4123ace238c3a43 \
|
||||||
--hash=sha256:a27c32cff98cd82dde23ab2f05fb9e06a32aaeb8357e96f1ec02a634b6619170
|
--hash=sha256:a7b7bfa5b9c5a81966454d17dffb2403cee25a806c858ee0486a08798227598f
|
||||||
django-yunohost-integration==0.2.4; python_version >= "3.7" and python_full_version < "4.0.0" \
|
django-yunohost-integration[ynh]==0.4.1 ; python_version >= "3.7" and python_full_version < "4.0.0" \
|
||||||
--hash=sha256:f5cdb5480025e90de0221d2b1c6282f517fd0c903702563cccb771cb3e1d9417 \
|
--hash=sha256:3769859db283a6b4d17468aeb1decab2f79d4b3e128b341342948e7bb3121e8a \
|
||||||
--hash=sha256:a4b3617a3b39225d6162fa88827e9fe8b65388e26a0bbc23ea665c62aa8cb044
|
--hash=sha256:e097cd209f3e09cbe325eadea36e3eb64c051690297c38dd89a1cd64bc35d92e
|
||||||
django==3.2.13; python_version >= "3.7" and python_full_version < "4.0.0" \
|
django==3.2.16 ; python_version >= "3.7" and python_full_version < "4.0.0" \
|
||||||
--hash=sha256:b896ca61edc079eb6bbaa15cf6071eb69d6aac08cce5211583cfb41515644fdf \
|
--hash=sha256:18ba8efa36b69cfcd4b670d0fa187c6fe7506596f0ababe580e16909bcdec121 \
|
||||||
--hash=sha256:6d93497a0a9bf6ba0e0b1a29cccdc40efbfc76297255b1309b3a884a688ec4b6
|
--hash=sha256:3adc285124244724a394fa9b9839cc8cd116faf7d159554c43ecdaa8cdf0b94d
|
||||||
fritzconnection==1.9.1; python_version >= "3.7" and python_full_version < "4.0.0" \
|
fritzconnection==1.10.3 ; python_version >= "3.7" and python_full_version < "4.0.0" \
|
||||||
--hash=sha256:9daa9a6c8366a77a2617b34b1db9b2191bb21ba638be35d691541a0892363a16 \
|
--hash=sha256:0b52772ff4e844edc510371ec6b9b0d2b56846c887fcbc7031e63d2d1f1e4bc0
|
||||||
--hash=sha256:244f74d62e426465108654d422d3a9e484c857b5bfaf088b623860f1874dd715
|
gunicorn==20.1.0 ; python_version >= "3.7" and python_full_version < "4.0.0" \
|
||||||
gunicorn==20.1.0; python_version >= "3.7" and python_full_version < "4.0.0" \
|
|
||||||
--hash=sha256:9dcc4547dbb1cb284accfb15ab5667a0e5d1881cc443e0677b4882a4067a807e \
|
--hash=sha256:9dcc4547dbb1cb284accfb15ab5667a0e5d1881cc443e0677b4882a4067a807e \
|
||||||
--hash=sha256:e0a968b5ba15f8a328fdfd7ab1fcb5af4470c28aaf7e55df02a99bc13138e6e8
|
--hash=sha256:e0a968b5ba15f8a328fdfd7ab1fcb5af4470c28aaf7e55df02a99bc13138e6e8
|
||||||
icdiff==2.0.5; python_version >= "3.7" and python_full_version < "4.0.0" \
|
icdiff==2.0.5 ; python_version >= "3.7" and python_full_version < "4.0.0" \
|
||||||
--hash=sha256:35d24b728e48b7e0a12bdb69386d3bfc7eef4fe922d0ac1cd70d6e5c11630bae
|
--hash=sha256:35d24b728e48b7e0a12bdb69386d3bfc7eef4fe922d0ac1cd70d6e5c11630bae
|
||||||
idna==3.3; python_version >= "3.7" and python_full_version < "3.0.0" or python_version >= "3.7" and python_full_version < "4.0.0" and python_full_version >= "3.6.0" \
|
idna==3.4 ; python_version >= "3.7" and python_version < "4" \
|
||||||
--hash=sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff \
|
--hash=sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4 \
|
||||||
--hash=sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d
|
--hash=sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2
|
||||||
importlib-metadata==4.2.0; python_version >= "3.7" and python_full_version < "4.0.0" and python_version < "3.8" \
|
importlib-metadata==4.2.0 ; python_version >= "3.7" and python_version < "3.8" \
|
||||||
--hash=sha256:057e92c15bc8d9e8109738a48db0ccb31b4d9d5cfbee5a8670879a30be66304b \
|
--hash=sha256:057e92c15bc8d9e8109738a48db0ccb31b4d9d5cfbee5a8670879a30be66304b \
|
||||||
--hash=sha256:b7e52a1f8dec14a75ea73e0891f3060099ca1d8e6a462a4dff11c3e119ea1b31
|
--hash=sha256:b7e52a1f8dec14a75ea73e0891f3060099ca1d8e6a462a4dff11c3e119ea1b31
|
||||||
packaging==21.3; python_version >= "3.7" and python_full_version < "4.0.0" \
|
packaging==21.3 ; python_version >= "3.7" and python_full_version < "4.0.0" \
|
||||||
--hash=sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522 \
|
--hash=sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb \
|
||||||
--hash=sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb
|
--hash=sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522
|
||||||
pprintpp==0.4.0; python_version >= "3.7" and python_full_version < "4.0.0" \
|
pprintpp==0.4.0 ; python_version >= "3.7" and python_full_version < "4.0.0" \
|
||||||
--hash=sha256:b6b4dcdd0c0c0d75e4d7b2f21a9e933e5b2ce62b26e1a54537f9651ae5a5c01d \
|
--hash=sha256:b6b4dcdd0c0c0d75e4d7b2f21a9e933e5b2ce62b26e1a54537f9651ae5a5c01d \
|
||||||
--hash=sha256:ea826108e2c7f49dc6d66c752973c3fc9749142a798d6b254e1e301cfdbc6403
|
--hash=sha256:ea826108e2c7f49dc6d66c752973c3fc9749142a798d6b254e1e301cfdbc6403
|
||||||
psycopg2==2.9.3; python_version >= "3.6" \
|
psycopg2==2.9.3 ; python_version >= "3.7" and python_full_version < "4.0.0" \
|
||||||
|
--hash=sha256:06f32425949bd5fe8f625c49f17ebb9784e1e4fe928b7cce72edc36fb68e4c0c \
|
||||||
|
--hash=sha256:0762c27d018edbcb2d34d51596e4346c983bd27c330218c56c4dc25ef7e819bf \
|
||||||
--hash=sha256:083707a696e5e1c330af2508d8fab36f9700b26621ccbcb538abe22e15485362 \
|
--hash=sha256:083707a696e5e1c330af2508d8fab36f9700b26621ccbcb538abe22e15485362 \
|
||||||
--hash=sha256:d3ca6421b942f60c008f81a3541e8faf6865a28d5a9b48544b0ee4f40cac7fca \
|
--hash=sha256:34b33e0162cfcaad151f249c2649fd1030010c16f4bbc40a604c1cb77173dcf7 \
|
||||||
|
--hash=sha256:4295093a6ae3434d33ec6baab4ca5512a5082cc43c0505293087b8a46d108461 \
|
||||||
|
--hash=sha256:8cf3878353cc04b053822896bc4922b194792df9df2f1ad8da01fb3043602126 \
|
||||||
|
--hash=sha256:8e841d1bf3434da985cc5ef13e6f75c8981ced601fd70cc6bf33351b91562981 \
|
||||||
--hash=sha256:9572e08b50aed176ef6d66f15a21d823bb6f6d23152d35e8451d7d2d18fdac56 \
|
--hash=sha256:9572e08b50aed176ef6d66f15a21d823bb6f6d23152d35e8451d7d2d18fdac56 \
|
||||||
--hash=sha256:a81e3866f99382dfe8c15a151f1ca5fde5815fde879348fe5a9884a7c092a305 \
|
--hash=sha256:a81e3866f99382dfe8c15a151f1ca5fde5815fde879348fe5a9884a7c092a305 \
|
||||||
--hash=sha256:cb10d44e6694d763fa1078a26f7f6137d69f555a78ec85dc2ef716c37447e4b2 \
|
--hash=sha256:cb10d44e6694d763fa1078a26f7f6137d69f555a78ec85dc2ef716c37447e4b2 \
|
||||||
--hash=sha256:4295093a6ae3434d33ec6baab4ca5512a5082cc43c0505293087b8a46d108461 \
|
--hash=sha256:d3ca6421b942f60c008f81a3541e8faf6865a28d5a9b48544b0ee4f40cac7fca
|
||||||
--hash=sha256:34b33e0162cfcaad151f249c2649fd1030010c16f4bbc40a604c1cb77173dcf7 \
|
pyparsing==3.0.9 ; python_version >= "3.7" and python_full_version < "4.0.0" \
|
||||||
--hash=sha256:0762c27d018edbcb2d34d51596e4346c983bd27c330218c56c4dc25ef7e819bf \
|
--hash=sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb \
|
||||||
--hash=sha256:8cf3878353cc04b053822896bc4922b194792df9df2f1ad8da01fb3043602126 \
|
--hash=sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc
|
||||||
--hash=sha256:06f32425949bd5fe8f625c49f17ebb9784e1e4fe928b7cce72edc36fb68e4c0c \
|
python-stdnum==1.17 ; python_version >= "3.7" and python_full_version < "4.0.0" \
|
||||||
--hash=sha256:8e841d1bf3434da985cc5ef13e6f75c8981ced601fd70cc6bf33351b91562981
|
|
||||||
pyparsing==3.0.9; python_version >= "3.7" and python_full_version < "4.0.0" and python_full_version >= "3.6.8" \
|
|
||||||
--hash=sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc \
|
|
||||||
--hash=sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb
|
|
||||||
python-stdnum==1.17; python_version >= "3.7" and python_full_version < "4.0.0" \
|
|
||||||
--hash=sha256:374e2b5e13912ccdbf50b0b23fca2c3e0531174805c32d74e145f37756328340 \
|
--hash=sha256:374e2b5e13912ccdbf50b0b23fca2c3e0531174805c32d74e145f37756328340 \
|
||||||
--hash=sha256:a46e6cf9652807314d369b654b255c86a59f93d18be2834f3d567ed1a346c547
|
--hash=sha256:a46e6cf9652807314d369b654b255c86a59f93d18be2834f3d567ed1a346c547
|
||||||
pytz==2022.1; python_version >= "3.7" and python_full_version < "4.0.0" \
|
pytz==2022.4 ; python_version >= "3.7" and python_full_version < "4.0.0" \
|
||||||
--hash=sha256:e68985985296d9a66a881eb3193b0906246245294a881e7c8afe623866ac6a5c \
|
--hash=sha256:2c0784747071402c6e99f0bafdb7da0fa22645f06554c7ae06bf6358897e9c91 \
|
||||||
--hash=sha256:1e760e2fe6a8163bc0b3d9a19c4f84342afa0a2affebfaa84b01b978a02ecaa7
|
--hash=sha256:48ce799d83b6f8aab2020e369b627446696619e79645419610b9facd909b3174
|
||||||
redis==4.3.1; python_version >= "3.7" and python_full_version < "4.0.0" \
|
redis==4.3.4 ; python_version >= "3.7" and python_full_version < "4.0.0" \
|
||||||
--hash=sha256:84316970995a7adb907a56754d2b92d88fc2d252963dc5ac34c88f0f1a22c25d \
|
--hash=sha256:a52d5694c9eb4292770084fa8c863f79367ca19884b329ab574d5cb2036b3e54 \
|
||||||
--hash=sha256:94b617b4cd296e94991146f66fc5559756fbefe9493604f0312e4d3298ac63e9
|
--hash=sha256:ddf27071df4adf3821c4f2ca59d67525c3a82e5f268bed97b813cb4fabf87880
|
||||||
requests==2.27.1; python_version >= "3.7" and python_full_version < "3.0.0" or python_version >= "3.7" and python_full_version < "4.0.0" and python_full_version >= "3.6.0" \
|
requests==2.28.1 ; python_version >= "3.7" and python_version < "4" \
|
||||||
--hash=sha256:f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d \
|
--hash=sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983 \
|
||||||
--hash=sha256:68d7c56fd5a8999887728ef304a6d12edc7be74f1cfa47714fc8b414525c9a61
|
--hash=sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349
|
||||||
six==1.16.0; python_version >= "3.7" and python_full_version < "3.0.0" or python_version >= "3.7" and python_full_version < "4.0.0" and python_full_version >= "3.3.0" \
|
setuptools==65.4.1 ; python_version >= "3.7" and python_full_version < "4.0.0" \
|
||||||
--hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254 \
|
--hash=sha256:1b6bdc6161661409c5f21508763dc63ab20a9ac2f8ba20029aaaa7fdb9118012 \
|
||||||
--hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926
|
--hash=sha256:3050e338e5871e70c72983072fe34f6032ae1cdeeeb67338199c2f74e083a80e
|
||||||
sqlparse==0.4.2; python_version >= "3.7" and python_full_version < "4.0.0" \
|
six==1.16.0 ; python_version >= "3.7" and python_full_version < "4.0.0" \
|
||||||
--hash=sha256:48719e356bb8b42991bdbb1e8b83223757b93789c00910a616a071910ca4a64d \
|
--hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \
|
||||||
--hash=sha256:0c00730c74263a94e5a9919ade150dfc3b19c574389985446148402998287dae
|
--hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254
|
||||||
typing-extensions==4.2.0; python_version >= "3.7" and python_full_version < "4.0.0" and python_version < "3.8" \
|
sqlparse==0.4.3 ; python_version >= "3.7" and python_full_version < "4.0.0" \
|
||||||
--hash=sha256:6657594ee297170d19f67d55c05852a874e7eb634f4f753dbd667855e07c1708 \
|
--hash=sha256:0323c0ec29cd52bceabc1b4d9d579e311f3e4961b98d174201d5622a23b85e34 \
|
||||||
--hash=sha256:f1c24655a0da0d1b67f07e17a5e6b2a105894e6824b92096378bb3668ef02376
|
--hash=sha256:69ca804846bb114d2ec380e4360a8a340db83f0ccf3afceeb1404df028f57268
|
||||||
urllib3==1.26.9; python_version >= "3.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version < "4" and python_version >= "3.7" and python_full_version < "4.0.0" \
|
typing-extensions==4.3.0 ; python_version >= "3.7" and python_version < "3.8" \
|
||||||
--hash=sha256:44ece4d53fb1706f667c9bd1c648f5469a2ec925fcf3a776667042d645472c14 \
|
--hash=sha256:25642c956049920a5aa49edcdd6ab1e06d7e5d467fc00e0506c44ac86fbfca02 \
|
||||||
--hash=sha256:aabaf16477806a5e1dd19aa41f8c2b7950dd3c746362d7e3223dbe6de6ac448e
|
--hash=sha256:e6d2677a32f47fc7eb2795db1dd15c1f34eff616bcaf2cfb5e997f854fa1c4a6
|
||||||
webencodings==0.5.1; python_version >= "3.7" and python_full_version < "4.0.0" \
|
urllib3==1.26.12 ; python_version >= "3.7" and python_version < "4" \
|
||||||
|
--hash=sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e \
|
||||||
|
--hash=sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997
|
||||||
|
webencodings==0.5.1 ; python_version >= "3.7" and python_full_version < "4.0.0" \
|
||||||
--hash=sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78 \
|
--hash=sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78 \
|
||||||
--hash=sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923
|
--hash=sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923
|
||||||
wrapt==1.14.1; python_version >= "3.7" and python_full_version < "3.0.0" or python_version >= "3.7" and python_full_version < "4.0.0" and python_full_version >= "3.5.0" \
|
wrapt==1.14.1 ; python_version >= "3.7" and python_full_version < "4.0.0" \
|
||||||
--hash=sha256:1b376b3f4896e7930f1f772ac4b064ac12598d1c38d04907e696cc4d794b43d3 \
|
|
||||||
--hash=sha256:903500616422a40a98a5a3c4ff4ed9d0066f3b4c951fa286018ecdf0750194ef \
|
|
||||||
--hash=sha256:5a9a0d155deafd9448baff28c08e150d9b24ff010e899311ddd63c45c2445e28 \
|
|
||||||
--hash=sha256:ddaea91abf8b0d13443f6dac52e89051a5063c7d014710dcb4d4abb2ff811a59 \
|
|
||||||
--hash=sha256:36f582d0c6bc99d5f39cd3ac2a9062e57f3cf606ade29a0a0d6b323462f4dd87 \
|
|
||||||
--hash=sha256:7ef58fb89674095bfc57c4069e95d7a31cfdc0939e2a579882ac7d55aadfd2a1 \
|
|
||||||
--hash=sha256:e2f83e18fe2f4c9e7db597e988f72712c0c3676d337d8b101f6758107c42425b \
|
|
||||||
--hash=sha256:ee2b1b1769f6707a8a445162ea16dddf74285c3964f605877a20e38545c3c462 \
|
|
||||||
--hash=sha256:833b58d5d0b7e5b9832869f039203389ac7cbf01765639c7309fd50ef619e0b1 \
|
|
||||||
--hash=sha256:80bb5c256f1415f747011dc3604b59bc1f91c6e7150bd7db03b19170ee06b320 \
|
|
||||||
--hash=sha256:07f7a7d0f388028b2df1d916e94bbb40624c59b48ecc6cbc232546706fac74c2 \
|
|
||||||
--hash=sha256:02b41b633c6261feff8ddd8d11c711df6842aba629fdd3da10249a53211a72c4 \
|
|
||||||
--hash=sha256:2fe803deacd09a233e4762a1adcea5db5d31e6be577a43352936179d14d90069 \
|
|
||||||
--hash=sha256:257fd78c513e0fb5cdbe058c27a0624c9884e735bbd131935fd49e9fe719d310 \
|
|
||||||
--hash=sha256:4fcc4649dc762cddacd193e6b55bc02edca674067f5f98166d7713b193932b7f \
|
|
||||||
--hash=sha256:11871514607b15cfeb87c547a49bca19fde402f32e2b1c24a632506c0a756656 \
|
|
||||||
--hash=sha256:8ad85f7f4e20964db4daadcab70b47ab05c7c1cf2a7c1e51087bfaa83831854c \
|
|
||||||
--hash=sha256:a9a52172be0b5aae932bef82a79ec0a0ce87288c7d132946d645eba03f0ad8a8 \
|
|
||||||
--hash=sha256:6d323e1554b3d22cfc03cd3243b5bb815a51f5249fdcbb86fda4bf62bab9e164 \
|
|
||||||
--hash=sha256:43ca3bbbe97af00f49efb06e352eae40434ca9d915906f77def219b88e85d907 \
|
|
||||||
--hash=sha256:6b1a564e6cb69922c7fe3a678b9f9a3c54e72b469875aa8018f18b4d1dd1adf3 \
|
|
||||||
--hash=sha256:00b6d4ea20a906c0ca56d84f93065b398ab74b927a7a3dbd470f6fc503f95dc3 \
|
--hash=sha256:00b6d4ea20a906c0ca56d84f93065b398ab74b927a7a3dbd470f6fc503f95dc3 \
|
||||||
--hash=sha256:a85d2b46be66a71bedde836d9e41859879cc54a2a04fad1191eb50c2066f6e9d \
|
|
||||||
--hash=sha256:dbcda74c67263139358f4d188ae5faae95c30929281bc6866d00573783c422b7 \
|
|
||||||
--hash=sha256:b21bb4c09ffabfa0e85e3a6b623e19b80e7acd709b9f91452b8297ace2a8ab00 \
|
|
||||||
--hash=sha256:9e0fd32e0148dd5dea6af5fee42beb949098564cc23211a88d799e434255a1f4 \
|
|
||||||
--hash=sha256:9736af4641846491aedb3c3f56b9bc5568d92b0692303b5a305301a95dfd38b1 \
|
|
||||||
--hash=sha256:5b02d65b9ccf0ef6c34cba6cf5bf2aab1bb2f49c6090bafeecc9cd81ad4ea1c1 \
|
|
||||||
--hash=sha256:21ac0156c4b089b330b7666db40feee30a5d52634cc4560e1905d6529a3897ff \
|
|
||||||
--hash=sha256:9f3e6f9e05148ff90002b884fbc2a86bd303ae847e472f44ecc06c2cd2fcdb2d \
|
|
||||||
--hash=sha256:6e743de5e9c3d1b7185870f480587b75b1cb604832e380d64f9504a0535912d1 \
|
|
||||||
--hash=sha256:d79d7d5dc8a32b7093e81e97dad755127ff77bcc899e845f41bf71747af0c569 \
|
|
||||||
--hash=sha256:81b19725065dcb43df02b37e03278c011a09e49757287dca60c5aecdd5a0b8ed \
|
|
||||||
--hash=sha256:b014c23646a467558be7da3d6b9fa409b2c567d2110599b7cf9a0c5992b3b471 \
|
|
||||||
--hash=sha256:88bd7b6bd70a5b6803c1abf6bca012f7ed963e58c68d76ee20b9d751c74a3248 \
|
|
||||||
--hash=sha256:b5901a312f4d14c59918c221323068fad0540e34324925c8475263841dbdfe68 \
|
|
||||||
--hash=sha256:d77c85fedff92cf788face9bfa3ebaa364448ebb1d765302e9af11bf449ca36d \
|
|
||||||
--hash=sha256:8d649d616e5c6a678b26d15ece345354f7c2286acd6db868e65fcc5ff7c24a77 \
|
|
||||||
--hash=sha256:7d2872609603cb35ca513d7404a94d6d608fc13211563571117046c9d2bcc3d7 \
|
|
||||||
--hash=sha256:ee6acae74a2b91865910eef5e7de37dc6895ad96fa23603d1d27ea69df545015 \
|
|
||||||
--hash=sha256:2b39d38039a1fdad98c87279b48bc5dce2c0ca0d73483b12cb72aa9609278e8a \
|
|
||||||
--hash=sha256:60db23fa423575eeb65ea430cee741acb7c26a1365d103f7b0f6ec412b893853 \
|
|
||||||
--hash=sha256:709fe01086a55cf79d20f741f39325018f4df051ef39fe921b1ebe780a66184c \
|
|
||||||
--hash=sha256:8c0ce1e99116d5ab21355d8ebe53d9460366704ea38ae4d9f6933188f327b456 \
|
|
||||||
--hash=sha256:e3fb1677c720409d5f671e39bac6c9e0e422584e5f518bfd50aa4cbbea02433f \
|
|
||||||
--hash=sha256:642c2e7a804fcf18c222e1060df25fc210b9c58db7c91416fb055897fc27e8cc \
|
|
||||||
--hash=sha256:7b7c050ae976e286906dd3f26009e117eb000fb2cf3533398c5ad9ccc86867b1 \
|
|
||||||
--hash=sha256:ef3f72c9666bba2bab70d2a8b79f2c6d2c1a42a7f7e2b0ec83bb2f9e383950af \
|
|
||||||
--hash=sha256:01c205616a89d09827986bc4e859bcabd64f5a0662a7fe95e0d359424e0e071b \
|
--hash=sha256:01c205616a89d09827986bc4e859bcabd64f5a0662a7fe95e0d359424e0e071b \
|
||||||
--hash=sha256:5a0f54ce2c092aaf439813735584b9537cad479575a09892b8352fea5e988dc0 \
|
--hash=sha256:02b41b633c6261feff8ddd8d11c711df6842aba629fdd3da10249a53211a72c4 \
|
||||||
|
--hash=sha256:07f7a7d0f388028b2df1d916e94bbb40624c59b48ecc6cbc232546706fac74c2 \
|
||||||
|
--hash=sha256:11871514607b15cfeb87c547a49bca19fde402f32e2b1c24a632506c0a756656 \
|
||||||
|
--hash=sha256:1b376b3f4896e7930f1f772ac4b064ac12598d1c38d04907e696cc4d794b43d3 \
|
||||||
|
--hash=sha256:21ac0156c4b089b330b7666db40feee30a5d52634cc4560e1905d6529a3897ff \
|
||||||
|
--hash=sha256:257fd78c513e0fb5cdbe058c27a0624c9884e735bbd131935fd49e9fe719d310 \
|
||||||
|
--hash=sha256:2b39d38039a1fdad98c87279b48bc5dce2c0ca0d73483b12cb72aa9609278e8a \
|
||||||
--hash=sha256:2cf71233a0ed05ccdabe209c606fe0bac7379fdcf687f39b944420d2a09fdb57 \
|
--hash=sha256:2cf71233a0ed05ccdabe209c606fe0bac7379fdcf687f39b944420d2a09fdb57 \
|
||||||
--hash=sha256:aa31fdcc33fef9eb2552cbcbfee7773d5a6792c137b359e82879c101e98584c5 \
|
--hash=sha256:2fe803deacd09a233e4762a1adcea5db5d31e6be577a43352936179d14d90069 \
|
||||||
--hash=sha256:d1967f46ea8f2db647c786e78d8cc7e4313dbd1b0aca360592d8027b8508e24d \
|
|
||||||
--hash=sha256:3232822c7d98d23895ccc443bbdf57c7412c5a65996c30442ebe6ed3df335383 \
|
--hash=sha256:3232822c7d98d23895ccc443bbdf57c7412c5a65996c30442ebe6ed3df335383 \
|
||||||
|
--hash=sha256:34aa51c45f28ba7f12accd624225e2b1e5a3a45206aa191f6f9aac931d9d56fe \
|
||||||
|
--hash=sha256:36f582d0c6bc99d5f39cd3ac2a9062e57f3cf606ade29a0a0d6b323462f4dd87 \
|
||||||
|
--hash=sha256:380a85cf89e0e69b7cfbe2ea9f765f004ff419f34194018a6827ac0e3edfed4d \
|
||||||
|
--hash=sha256:40e7bc81c9e2b2734ea4bc1aceb8a8f0ceaac7c5299bc5d69e37c44d9081d43b \
|
||||||
|
--hash=sha256:43ca3bbbe97af00f49efb06e352eae40434ca9d915906f77def219b88e85d907 \
|
||||||
|
--hash=sha256:4fcc4649dc762cddacd193e6b55bc02edca674067f5f98166d7713b193932b7f \
|
||||||
|
--hash=sha256:5a0f54ce2c092aaf439813735584b9537cad479575a09892b8352fea5e988dc0 \
|
||||||
|
--hash=sha256:5a9a0d155deafd9448baff28c08e150d9b24ff010e899311ddd63c45c2445e28 \
|
||||||
|
--hash=sha256:5b02d65b9ccf0ef6c34cba6cf5bf2aab1bb2f49c6090bafeecc9cd81ad4ea1c1 \
|
||||||
|
--hash=sha256:60db23fa423575eeb65ea430cee741acb7c26a1365d103f7b0f6ec412b893853 \
|
||||||
|
--hash=sha256:642c2e7a804fcf18c222e1060df25fc210b9c58db7c91416fb055897fc27e8cc \
|
||||||
|
--hash=sha256:6a9a25751acb379b466ff6be78a315e2b439d4c94c1e99cb7266d40a537995d3 \
|
||||||
|
--hash=sha256:6b1a564e6cb69922c7fe3a678b9f9a3c54e72b469875aa8018f18b4d1dd1adf3 \
|
||||||
|
--hash=sha256:6d323e1554b3d22cfc03cd3243b5bb815a51f5249fdcbb86fda4bf62bab9e164 \
|
||||||
|
--hash=sha256:6e743de5e9c3d1b7185870f480587b75b1cb604832e380d64f9504a0535912d1 \
|
||||||
|
--hash=sha256:709fe01086a55cf79d20f741f39325018f4df051ef39fe921b1ebe780a66184c \
|
||||||
|
--hash=sha256:7b7c050ae976e286906dd3f26009e117eb000fb2cf3533398c5ad9ccc86867b1 \
|
||||||
|
--hash=sha256:7d2872609603cb35ca513d7404a94d6d608fc13211563571117046c9d2bcc3d7 \
|
||||||
|
--hash=sha256:7ef58fb89674095bfc57c4069e95d7a31cfdc0939e2a579882ac7d55aadfd2a1 \
|
||||||
|
--hash=sha256:80bb5c256f1415f747011dc3604b59bc1f91c6e7150bd7db03b19170ee06b320 \
|
||||||
|
--hash=sha256:81b19725065dcb43df02b37e03278c011a09e49757287dca60c5aecdd5a0b8ed \
|
||||||
|
--hash=sha256:833b58d5d0b7e5b9832869f039203389ac7cbf01765639c7309fd50ef619e0b1 \
|
||||||
|
--hash=sha256:88bd7b6bd70a5b6803c1abf6bca012f7ed963e58c68d76ee20b9d751c74a3248 \
|
||||||
|
--hash=sha256:8ad85f7f4e20964db4daadcab70b47ab05c7c1cf2a7c1e51087bfaa83831854c \
|
||||||
|
--hash=sha256:8c0ce1e99116d5ab21355d8ebe53d9460366704ea38ae4d9f6933188f327b456 \
|
||||||
|
--hash=sha256:8d649d616e5c6a678b26d15ece345354f7c2286acd6db868e65fcc5ff7c24a77 \
|
||||||
|
--hash=sha256:903500616422a40a98a5a3c4ff4ed9d0066f3b4c951fa286018ecdf0750194ef \
|
||||||
|
--hash=sha256:9736af4641846491aedb3c3f56b9bc5568d92b0692303b5a305301a95dfd38b1 \
|
||||||
--hash=sha256:988635d122aaf2bdcef9e795435662bcd65b02f4f4c1ae37fbee7401c440b3a7 \
|
--hash=sha256:988635d122aaf2bdcef9e795435662bcd65b02f4f4c1ae37fbee7401c440b3a7 \
|
||||||
--hash=sha256:9cca3c2cdadb362116235fdbd411735de4328c61425b0aa9f872fd76d02c4e86 \
|
--hash=sha256:9cca3c2cdadb362116235fdbd411735de4328c61425b0aa9f872fd76d02c4e86 \
|
||||||
--hash=sha256:d52a25136894c63de15a35bc0bdc5adb4b0e173b9c0d07a2be9d3ca64a332735 \
|
--hash=sha256:9e0fd32e0148dd5dea6af5fee42beb949098564cc23211a88d799e434255a1f4 \
|
||||||
--hash=sha256:40e7bc81c9e2b2734ea4bc1aceb8a8f0ceaac7c5299bc5d69e37c44d9081d43b \
|
--hash=sha256:9f3e6f9e05148ff90002b884fbc2a86bd303ae847e472f44ecc06c2cd2fcdb2d \
|
||||||
|
--hash=sha256:a85d2b46be66a71bedde836d9e41859879cc54a2a04fad1191eb50c2066f6e9d \
|
||||||
|
--hash=sha256:a9a52172be0b5aae932bef82a79ec0a0ce87288c7d132946d645eba03f0ad8a8 \
|
||||||
|
--hash=sha256:aa31fdcc33fef9eb2552cbcbfee7773d5a6792c137b359e82879c101e98584c5 \
|
||||||
|
--hash=sha256:b014c23646a467558be7da3d6b9fa409b2c567d2110599b7cf9a0c5992b3b471 \
|
||||||
|
--hash=sha256:b21bb4c09ffabfa0e85e3a6b623e19b80e7acd709b9f91452b8297ace2a8ab00 \
|
||||||
|
--hash=sha256:b5901a312f4d14c59918c221323068fad0540e34324925c8475263841dbdfe68 \
|
||||||
--hash=sha256:b9b7a708dd92306328117d8c4b62e2194d00c365f18eff11a9b53c6f923b01e3 \
|
--hash=sha256:b9b7a708dd92306328117d8c4b62e2194d00c365f18eff11a9b53c6f923b01e3 \
|
||||||
--hash=sha256:6a9a25751acb379b466ff6be78a315e2b439d4c94c1e99cb7266d40a537995d3 \
|
--hash=sha256:d1967f46ea8f2db647c786e78d8cc7e4313dbd1b0aca360592d8027b8508e24d \
|
||||||
--hash=sha256:34aa51c45f28ba7f12accd624225e2b1e5a3a45206aa191f6f9aac931d9d56fe \
|
--hash=sha256:d52a25136894c63de15a35bc0bdc5adb4b0e173b9c0d07a2be9d3ca64a332735 \
|
||||||
|
--hash=sha256:d77c85fedff92cf788face9bfa3ebaa364448ebb1d765302e9af11bf449ca36d \
|
||||||
|
--hash=sha256:d79d7d5dc8a32b7093e81e97dad755127ff77bcc899e845f41bf71747af0c569 \
|
||||||
|
--hash=sha256:dbcda74c67263139358f4d188ae5faae95c30929281bc6866d00573783c422b7 \
|
||||||
|
--hash=sha256:ddaea91abf8b0d13443f6dac52e89051a5063c7d014710dcb4d4abb2ff811a59 \
|
||||||
--hash=sha256:dee0ce50c6a2dd9056c20db781e9c1cfd33e77d2d569f5d1d9321c641bb903d5 \
|
--hash=sha256:dee0ce50c6a2dd9056c20db781e9c1cfd33e77d2d569f5d1d9321c641bb903d5 \
|
||||||
--hash=sha256:dee60e1de1898bde3b238f18340eec6148986da0455d8ba7848d50470a7a32fb \
|
--hash=sha256:dee60e1de1898bde3b238f18340eec6148986da0455d8ba7848d50470a7a32fb \
|
||||||
--hash=sha256:380a85cf89e0e69b7cfbe2ea9f765f004ff419f34194018a6827ac0e3edfed4d
|
--hash=sha256:e2f83e18fe2f4c9e7db597e988f72712c0c3676d337d8b101f6758107c42425b \
|
||||||
zipp==3.8.0; python_version >= "3.7" and python_full_version < "4.0.0" and python_version < "3.8" \
|
--hash=sha256:e3fb1677c720409d5f671e39bac6c9e0e422584e5f518bfd50aa4cbbea02433f \
|
||||||
--hash=sha256:c4f6e5bbf48e74f7a38e7cc5b0480ff42b0ae5178957d564d18932525d5cf099 \
|
--hash=sha256:ee2b1b1769f6707a8a445162ea16dddf74285c3964f605877a20e38545c3c462 \
|
||||||
--hash=sha256:56bf8aadb83c24db6c4b577e13de374ccfb67da2078beba1d037c17980bf43ad
|
--hash=sha256:ee6acae74a2b91865910eef5e7de37dc6895ad96fa23603d1d27ea69df545015 \
|
||||||
|
--hash=sha256:ef3f72c9666bba2bab70d2a8b79f2c6d2c1a42a7f7e2b0ec83bb2f9e383950af
|
||||||
|
zipp==3.8.1 ; python_version >= "3.7" and python_version < "3.8" \
|
||||||
|
--hash=sha256:05b45f1ee8f807d0cc928485ca40a07cb491cf092ff587c0df9cb1fd154848d2 \
|
||||||
|
--hash=sha256:47c40d7fe183a6f21403a199b3e4192cca5774656965b0a4988ad2f8feb5f009
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
# Please do not modify this file, it will be reset at the next update.
|
# Please do not modify this file, it will be reset at the next update.
|
||||||
# You can edit the file __FINAL_HOME_PATH__/local_settings.py and add/modify the settings you need.
|
# You can edit the file __FINALPATH__/local_settings.py and add/modify the settings you need.
|
||||||
# The parameters you add in local_settings.py will overwrite these,
|
# The parameters you add in local_settings.py will overwrite these,
|
||||||
# but you can use the options and documentation in this file to find out what can be done.
|
# but you can use the options and documentation in this file to find out what can be done.
|
||||||
|
|
||||||
|
@ -11,46 +11,63 @@
|
||||||
|
|
||||||
from pathlib import Path as __Path
|
from pathlib import Path as __Path
|
||||||
|
|
||||||
from django_yunohost_integration.base_settings import * # noqa
|
from django_yunohost_integration.base_settings import * # noqa:F401,F403
|
||||||
from django_yunohost_integration.secret_key import get_or_create_secret as __get_or_create_secret
|
from django_yunohost_integration.secret_key import get_or_create_secret as __get_or_create_secret
|
||||||
from djfritz_project.settings.base import * # noqa
|
|
||||||
|
from djfritz_project.settings.base import * # noqa:F401,F403
|
||||||
|
|
||||||
|
|
||||||
DEBUG = False # Don't turn DEBUG on in production!
|
from django_yunohost_integration.base_settings import LOGGING # noqa:F401 isort:skip
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
FINAL_HOME_PATH = __Path('__FINAL_HOME_PATH__') # /opt/yunohost/$app
|
FINALPATH = __Path('__FINALPATH__') # /opt/yunohost/$app
|
||||||
assert FINAL_HOME_PATH.is_dir(), f'Directory not exists: {FINAL_HOME_PATH}'
|
assert FINALPATH.is_dir(), f'Directory not exists: {FINALPATH}'
|
||||||
|
|
||||||
FINAL_WWW_PATH = __Path('__FINAL_WWW_PATH__') # /var/www/$app
|
PUBLIC_PATH = __Path('__PUBLIC_PATH__') # /var/www/$app
|
||||||
assert FINAL_WWW_PATH.is_dir(), f'Directory not exists: {FINAL_WWW_PATH}'
|
assert PUBLIC_PATH.is_dir(), f'Directory not exists: {PUBLIC_PATH}'
|
||||||
|
|
||||||
LOG_FILE = __Path('__LOG_FILE__') # /var/log/$app/django-fritzconnection.log
|
LOG_FILE = __Path('__LOG_FILE__') # /var/log/$app/django_example_ynh.log
|
||||||
assert LOG_FILE.is_file(), f'File not exists: {LOG_FILE}'
|
assert LOG_FILE.is_file(), f'File not exists: {LOG_FILE}'
|
||||||
|
|
||||||
PATH_URL = '__PATH_URL__' # $YNH_APP_ARG_PATH
|
PATH_URL = '__PATH_URL__' # $YNH_APP_ARG_PATH
|
||||||
PATH_URL = PATH_URL.strip('/')
|
PATH_URL = PATH_URL.strip('/')
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
# config_panel.toml settings:
|
||||||
|
|
||||||
ROOT_URLCONF = 'urls' # /opt/yunohost/django-fritzconnection/ynh_urls.py
|
DEBUG_ENABLED = '__DEBUG_ENABLED__'
|
||||||
|
DEBUG = bool(int(DEBUG_ENABLED))
|
||||||
|
|
||||||
|
LOG_LEVEL = '__LOG_LEVEL__'
|
||||||
|
ADMIN_EMAIL = '__ADMIN_EMAIL__'
|
||||||
|
DEFAULT_FROM_EMAIL = '__DEFAULT_FROM_EMAIL__'
|
||||||
|
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
# Function that will be called to finalize a user profile:
|
# Function that will be called to finalize a user profile:
|
||||||
YNH_SETUP_USER = 'setup_user.setup_project_user'
|
YNH_SETUP_USER = 'setup_user.setup_project_user'
|
||||||
|
|
||||||
SECRET_KEY = __get_or_create_secret(FINAL_HOME_PATH / 'secret.txt') # /opt/yunohost/$app/secret.txt
|
SECRET_KEY = __get_or_create_secret(FINALPATH / 'secret.txt') # /opt/yunohost/$app/secret.txt
|
||||||
|
|
||||||
INSTALLED_APPS.append('django_yunohost_integration')
|
INSTALLED_APPS += [
|
||||||
|
'axes', # https://github.com/jazzband/django-axes
|
||||||
|
'django_yunohost_integration', # https://github.com/YunoHost-Apps/django_yunohost_integration
|
||||||
|
]
|
||||||
|
|
||||||
MIDDLEWARE.insert(
|
MIDDLEWARE.insert(
|
||||||
MIDDLEWARE.index('django.contrib.auth.middleware.AuthenticationMiddleware') + 1,
|
MIDDLEWARE.index('django.contrib.auth.middleware.AuthenticationMiddleware') + 1,
|
||||||
# login a user via HTTP_REMOTE_USER header from SSOwat:
|
# login a user via HTTP_REMOTE_USER header from SSOwat:
|
||||||
'django_yunohost_integration.sso_auth.auth_middleware.SSOwatRemoteUserMiddleware',
|
'django_yunohost_integration.sso_auth.auth_middleware.SSOwatRemoteUserMiddleware',
|
||||||
)
|
)
|
||||||
|
# AxesMiddleware should be the last middleware:
|
||||||
|
MIDDLEWARE.append('axes.middleware.AxesMiddleware')
|
||||||
|
|
||||||
|
|
||||||
# Keep ModelBackend around for per-user permissions and superuser
|
# Keep ModelBackend around for per-user permissions and superuser
|
||||||
AUTHENTICATION_BACKENDS = (
|
AUTHENTICATION_BACKENDS = (
|
||||||
|
'axes.backends.AxesBackend', # AxesBackend should be the first backend!
|
||||||
|
#
|
||||||
# Authenticate via SSO and nginx 'HTTP_REMOTE_USER' header:
|
# Authenticate via SSO and nginx 'HTTP_REMOTE_USER' header:
|
||||||
'django_yunohost_integration.sso_auth.auth_backend.SSOwatUserBackend',
|
'django_yunohost_integration.sso_auth.auth_backend.SSOwatUserBackend',
|
||||||
#
|
#
|
||||||
|
@ -63,10 +80,12 @@ LOGIN_URL = '/yunohost/sso/'
|
||||||
LOGOUT_REDIRECT_URL = '/yunohost/sso/'
|
LOGOUT_REDIRECT_URL = '/yunohost/sso/'
|
||||||
# /yunohost/sso/?action=logout
|
# /yunohost/sso/?action=logout
|
||||||
|
|
||||||
|
ROOT_URLCONF = 'urls' # .../conf/urls.py
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
ADMINS = (('__ADMIN__', '__ADMINMAIL__'),)
|
ADMINS = (('__ADMIN__', ADMIN_EMAIL),)
|
||||||
|
|
||||||
MANAGERS = ADMINS
|
MANAGERS = ADMINS
|
||||||
|
|
||||||
|
@ -93,11 +112,10 @@ EMAIL_SUBJECT_PREFIX = f'[{SITE_TITLE}] '
|
||||||
|
|
||||||
|
|
||||||
# E-mail address that error messages come from.
|
# E-mail address that error messages come from.
|
||||||
SERVER_EMAIL = 'noreply@__DOMAIN__'
|
SERVER_EMAIL = ADMIN_EMAIL
|
||||||
|
|
||||||
# Default email address to use for various automated correspondence from
|
# Default email address to use for various automated correspondence from
|
||||||
# the site managers. Used for registration emails.
|
# the site managers. Used for registration emails.
|
||||||
DEFAULT_FROM_EMAIL = '__ADMINMAIL__'
|
|
||||||
|
|
||||||
# List of URLs your site is supposed to serve
|
# List of URLs your site is supposed to serve
|
||||||
ALLOWED_HOSTS = ['__DOMAIN__']
|
ALLOWED_HOSTS = ['__DOMAIN__']
|
||||||
|
@ -108,9 +126,6 @@ CACHES = {
|
||||||
'default': {
|
'default': {
|
||||||
'BACKEND': 'django_redis.cache.RedisCache',
|
'BACKEND': 'django_redis.cache.RedisCache',
|
||||||
'LOCATION': 'redis://127.0.0.1:6379/__REDIS_DB__',
|
'LOCATION': 'redis://127.0.0.1:6379/__REDIS_DB__',
|
||||||
# If redis is running on same host as django-fritzconnection, you might
|
|
||||||
# want to use unix sockets instead:
|
|
||||||
# 'LOCATION': 'unix:///var/run/redis/redis.sock?db=1',
|
|
||||||
'OPTIONS': {
|
'OPTIONS': {
|
||||||
'CLIENT_CLASS': 'django_redis.client.DefaultClient',
|
'CLIENT_CLASS': 'django_redis.client.DefaultClient',
|
||||||
},
|
},
|
||||||
|
@ -129,47 +144,25 @@ else:
|
||||||
STATIC_URL = '/static/'
|
STATIC_URL = '/static/'
|
||||||
MEDIA_URL = '/media/'
|
MEDIA_URL = '/media/'
|
||||||
|
|
||||||
STATIC_ROOT = str(FINAL_WWW_PATH / 'static')
|
STATIC_ROOT = str(PUBLIC_PATH / 'static')
|
||||||
MEDIA_ROOT = str(FINAL_WWW_PATH / 'media')
|
MEDIA_ROOT = str(PUBLIC_PATH / 'media')
|
||||||
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
LOGGING = {
|
# Set log file to e.g.: /var/log/$app/$app.log
|
||||||
'version': 1,
|
LOGGING['handlers']['log_file']['filename'] = str(LOG_FILE)
|
||||||
'disable_existing_loggers': True,
|
|
||||||
'formatters': {
|
# Example how to add logging to own app:
|
||||||
'verbose': {
|
LOGGING['loggers']['djfritz'] = {
|
||||||
'format': '{asctime} {levelname} {name} {module}.{funcName} {message}',
|
'handlers': ['syslog', 'log_file', 'mail_admins'],
|
||||||
'style': '{',
|
'level': 'INFO',
|
||||||
},
|
'propagate': False,
|
||||||
},
|
|
||||||
'handlers': {
|
|
||||||
'mail_admins': {
|
|
||||||
'level': 'ERROR',
|
|
||||||
'formatter': 'verbose',
|
|
||||||
'class': 'django.utils.log.AdminEmailHandler',
|
|
||||||
'include_html': True,
|
|
||||||
},
|
|
||||||
'log_file': {
|
|
||||||
'level': 'DEBUG',
|
|
||||||
'class': 'logging.handlers.WatchedFileHandler',
|
|
||||||
'formatter': 'verbose',
|
|
||||||
'filename': str(LOG_FILE),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
'loggers': {
|
|
||||||
'': {'handlers': ['log_file', 'mail_admins'], 'level': 'INFO', 'propagate': False},
|
|
||||||
'django': {'handlers': ['log_file', 'mail_admins'], 'level': 'INFO', 'propagate': False},
|
|
||||||
'axes': {'handlers': ['log_file', 'mail_admins'], 'level': 'WARNING', 'propagate': False},
|
|
||||||
'django_tools': {'handlers': ['log_file', 'mail_admins'], 'level': 'INFO', 'propagate': False},
|
|
||||||
'django_yunohost_integration': {'handlers': ['log_file', 'mail_admins'], 'level': 'INFO', 'propagate': False},
|
|
||||||
'djfritz': {'handlers': ['log_file', 'mail_admins'], 'level': 'INFO', 'propagate': False},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from local_settings import * # noqa
|
from local_settings import * # noqa:F401,F403
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=django-fritzconnection application server
|
Description=__APP__ server
|
||||||
After=redis.service postgresql.service
|
After=redis.service postgresql.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
14
conf/urls.py
14
conf/urls.py
|
@ -1,21 +1,19 @@
|
||||||
|
"""
|
||||||
|
urls.py
|
||||||
|
~~~~~~~
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.conf.urls import static
|
|
||||||
from django.urls import include, path
|
from django.urls import include, path
|
||||||
|
|
||||||
|
|
||||||
# from django_yunohost_integration.views import request_media_debug_view
|
|
||||||
|
|
||||||
|
|
||||||
if settings.PATH_URL:
|
if settings.PATH_URL:
|
||||||
# settings.PATH_URL is the $YNH_APP_ARG_PATH
|
# settings.PATH_URL is the $YNH_APP_ARG_PATH
|
||||||
# Prefix all urls with "PATH_URL":
|
# Prefix all urls with "PATH_URL":
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
# path(f'{settings.PATH_URL}/debug/', request_media_debug_view),
|
|
||||||
|
|
||||||
path(f'{settings.PATH_URL}/', include('djfritz_project.urls')),
|
path(f'{settings.PATH_URL}/', include('djfritz_project.urls')),
|
||||||
]
|
]
|
||||||
if settings.SERVE_FILES:
|
|
||||||
urlpatterns += static.static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
|
||||||
else:
|
else:
|
||||||
# Installed to domain root, without a path prefix
|
# Installed to domain root, without a path prefix
|
||||||
# Just use the default project urls.py
|
# Just use the default project urls.py
|
||||||
|
|
38
config_panel.toml
Normal file
38
config_panel.toml
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
# https://github.com/YunoHost/example_ynh/blob/master/config_panel.toml.example
|
||||||
|
|
||||||
|
version = "1.0"
|
||||||
|
|
||||||
|
[main]
|
||||||
|
name.en = "Main configuration"
|
||||||
|
name.fr = "Configuration principale"
|
||||||
|
services = ["__APP__"]
|
||||||
|
|
||||||
|
[main.config]
|
||||||
|
name = "Configuration Options"
|
||||||
|
|
||||||
|
[main.config.default_from_email]
|
||||||
|
ask = "from email"
|
||||||
|
type = "email"
|
||||||
|
help = "Default email address to use for various automated emails."
|
||||||
|
bind = "default_from_email:__FINALPATH__/settings.py"
|
||||||
|
|
||||||
|
[main.config.admin_email]
|
||||||
|
ask = "ADMIN email"
|
||||||
|
type = "email"
|
||||||
|
help = "EMail address for error emails."
|
||||||
|
bind = "admin_email:__FINALPATH__/settings.py"
|
||||||
|
|
||||||
|
[main.config.debug_enabled]
|
||||||
|
ask = "DEBUG mode"
|
||||||
|
type = "boolean"
|
||||||
|
yes = "1"
|
||||||
|
no = "0"
|
||||||
|
help = "Should be never enabled in production!"
|
||||||
|
bind = "debug_enabled:__FINALPATH__/settings.py"
|
||||||
|
|
||||||
|
[main.config.log_level]
|
||||||
|
type = "string"
|
||||||
|
ask = "Log Level"
|
||||||
|
choices = ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"]
|
||||||
|
default = "WARNING"
|
||||||
|
bind = "log_level:__FINALPATH__/settings.py"
|
0
doc/screenshots/.gitkeep
Normal file
0
doc/screenshots/.gitkeep
Normal file
0
doc/screenshots/gitkeep
Normal file
0
doc/screenshots/gitkeep
Normal file
|
@ -22,6 +22,9 @@ def main():
|
||||||
django_settings_path=BASE_PATH / 'conf' / 'settings.py',
|
django_settings_path=BASE_PATH / 'conf' / 'settings.py',
|
||||||
destination=BASE_PATH / 'local_test',
|
destination=BASE_PATH / 'local_test',
|
||||||
runserver=True,
|
runserver=True,
|
||||||
|
extra_replacements={
|
||||||
|
'__DEBUG_ENABLED__': '1',
|
||||||
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
"description": {
|
"description": {
|
||||||
"en": "Web based FritzBox management using Python/Django."
|
"en": "Web based FritzBox management using Python/Django."
|
||||||
},
|
},
|
||||||
"version": "0.2.0~ynh1",
|
"version": "0.2.0~ynh2",
|
||||||
"url": "https://github.com/jedie/django-fritzconnection",
|
"url": "https://github.com/YunoHost-Apps/django-fritzconnection_ynh",
|
||||||
"upstream": {
|
"upstream": {
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"website": "https://github.com/jedie/django-fritzconnection",
|
"website": "https://github.com/jedie/django-fritzconnection",
|
||||||
|
@ -19,11 +19,11 @@
|
||||||
},
|
},
|
||||||
"previous_maintainers": [],
|
"previous_maintainers": [],
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 4.0"
|
"yunohost": ">= 4.4"
|
||||||
},
|
},
|
||||||
"multi_instance": true,
|
"multi_instance": true,
|
||||||
"services": [
|
"services": [
|
||||||
"nginx"
|
"nginx", "postgresql", "redis"
|
||||||
],
|
],
|
||||||
"arguments": {
|
"arguments": {
|
||||||
"install" : [
|
"install" : [
|
||||||
|
@ -41,6 +41,6 @@
|
||||||
"name": "admin",
|
"name": "admin",
|
||||||
"type": "user"
|
"type": "user"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
759
poetry.lock
generated
759
poetry.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -1,38 +1,41 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "django-fritzconnection_ynh"
|
name = "django-fritzconnection_ynh"
|
||||||
version = "0.2.0~ynh1"
|
version = "0.2.0+ynh2"
|
||||||
description = "Test django-fritzconnection_ynh via local_test.py"
|
description = "Test django-fritzconnection_ynh via local_test.py"
|
||||||
authors = ["JensDiemer <git@jensdiemer.de>"]
|
authors = ["JensDiemer <git@jensdiemer.de>"]
|
||||||
license = "GPL"
|
license = "GPL"
|
||||||
|
homepage = "https://github.com/YunoHost-Apps/django-fritzconnection_ynh"
|
||||||
|
|
||||||
|
[tool.poetry.urls]
|
||||||
|
"Bug Tracker" = "https://github.com/YunoHost-Apps/django-fritzconnection_ynh/issues"
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
# Keep Python 3.7 until Yunohost contains a newer Python Version ;)
|
python = ">=3.7,<4.0.0" # TODO: Update to >=3.8 after YunoHost updates to Bullseye
|
||||||
python = ">=3.7,<4.0.0"
|
|
||||||
django-fritzconnection = ">=0.2.0"
|
django-fritzconnection = ">=0.2.0"
|
||||||
|
|
||||||
# Note: "ynh" extras will install gunicorn, psycopg2, django-redis and django-axes
|
# extras "ynh" will install: gunicorn, psycopg2, django-redis and django-axes
|
||||||
django_yunohost_integration = {version = ">=v0.2.0", extras = ["ynh"]}
|
# see: https://github.com/YunoHost-Apps/django_yunohost_integration/blob/main/pyproject.toml
|
||||||
|
django_yunohost_integration = {version = ">=0.4.1", extras = ["ynh"]} # https://github.com/YunoHost-Apps/django_yunohost_integration
|
||||||
psycopg2 = "*" # https://www.psycopg.org/docs/install.html#build-prerequisites
|
|
||||||
|
|
||||||
[tool.poetry.dev-dependencies]
|
[tool.poetry.dev-dependencies]
|
||||||
bx_py_utils = "*"
|
bx_py_utils = "*" # https://github.com/boxine/bx_py_utils
|
||||||
|
bx_django_utils = "*" # https://github.com/boxine/bx_django_utils
|
||||||
tox = "*"
|
tox = "*"
|
||||||
pytest = "*"
|
pytest = "*"
|
||||||
pytest-cov = "*"
|
pytest-cov = "*"
|
||||||
pytest-django = "*"
|
pytest-django = "*"
|
||||||
pytest-darker = "*" # https://github.com/akaihola/pytest-darker
|
pytest-darker = "*" # https://github.com/akaihola/pytest-darker
|
||||||
pytest-flake8 = "*"
|
|
||||||
pytest-isort = "*"
|
|
||||||
coveralls = "*"
|
coveralls = "*"
|
||||||
isort = "*"
|
isort = "*"
|
||||||
flake8 = "*"
|
flake8 = "*"
|
||||||
flynt = "*"
|
EditorConfig = "*" # https://github.com/editorconfig/editorconfig-core-py
|
||||||
darker = "*" # https://github.com/akaihola/darker
|
safety = "*" # https://github.com/pyupio/safety
|
||||||
pyupgrade = "*"
|
requests = "*" # https://github.com/psf/requests
|
||||||
|
packaging = "*" # https://github.com/pypa/packagi
|
||||||
|
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["poetry-core>=1.0.0"]
|
requires = ["poetry-core"]
|
||||||
build-backend = "poetry.core.masonry.api"
|
build-backend = "poetry.core.masonry.api"
|
||||||
|
|
||||||
|
|
||||||
|
@ -52,16 +55,12 @@ lint = [
|
||||||
log_level = "INFO"
|
log_level = "INFO"
|
||||||
|
|
||||||
|
|
||||||
[tool.flynt]
|
|
||||||
line_length = 100
|
|
||||||
|
|
||||||
|
|
||||||
[tool.isort]
|
[tool.isort]
|
||||||
# https://pycqa.github.io/isort/docs/configuration/config_files/#pyprojecttoml-preferred-format
|
# https://pycqa.github.io/isort/docs/configuration/config_files/#pyprojecttoml-preferred-format
|
||||||
atomic=true
|
atomic=true
|
||||||
profile='black'
|
profile='black'
|
||||||
|
skip_glob=["*/htmlcov/*","*/migrations/*","*/local_test/*"]
|
||||||
line_length=100
|
line_length=100
|
||||||
skip_glob=["*/htmlcov/*","*/migrations/*"]
|
|
||||||
known_first_party=["djfritz","djfritz_project","djfritz_tests"]
|
known_first_party=["djfritz","djfritz_project","djfritz_tests"]
|
||||||
lines_after_imports=2
|
lines_after_imports=2
|
||||||
|
|
||||||
|
@ -69,7 +68,7 @@ lines_after_imports=2
|
||||||
[tool.pytest.ini_options]
|
[tool.pytest.ini_options]
|
||||||
# https://docs.pytest.org/en/latest/customize.html#pyproject-toml
|
# https://docs.pytest.org/en/latest/customize.html#pyproject-toml
|
||||||
minversion = "6.0"
|
minversion = "6.0"
|
||||||
norecursedirs = ".* .git __pycache__ conf coverage* dist htmlcov"
|
norecursedirs = ".* .git __pycache__ conf local_test coverage* dist htmlcov"
|
||||||
# sometimes helpfull "addopts" arguments:
|
# sometimes helpfull "addopts" arguments:
|
||||||
# -vv
|
# -vv
|
||||||
# --verbose
|
# --verbose
|
||||||
|
@ -87,26 +86,27 @@ addopts = """
|
||||||
--no-cov-on-fail
|
--no-cov-on-fail
|
||||||
--showlocals
|
--showlocals
|
||||||
--darker
|
--darker
|
||||||
--flake8
|
|
||||||
--isort
|
|
||||||
--doctest-modules
|
--doctest-modules
|
||||||
--failed-first
|
--failed-first
|
||||||
--last-failed-no-failures all
|
|
||||||
--new-first
|
--new-first
|
||||||
"""
|
"""
|
||||||
# TODO: --mypy
|
|
||||||
|
|
||||||
|
[tool.coverage.run]
|
||||||
|
omit = [".*"]
|
||||||
|
|
||||||
|
|
||||||
[tool.tox]
|
[tool.tox]
|
||||||
# https://tox.readthedocs.io/en/latest/example/basic.html#pyproject-toml-tox-legacy-ini
|
# https://tox.readthedocs.io/en/latest/example/basic.html#pyproject-toml-tox-legacy-ini
|
||||||
legacy_tox_ini = """
|
legacy_tox_ini = """
|
||||||
[tox]
|
[tox]
|
||||||
isolated_build = True
|
isolated_build = True
|
||||||
envlist = px310,py39,py38,py37
|
envlist = py{37,38,39,310}
|
||||||
skip_missing_interpreters = True
|
skip_missing_interpreters = True
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
passenv = *
|
passenv = *
|
||||||
whitelist_externals = make
|
whitelist_externals = make
|
||||||
commands =
|
commands =
|
||||||
pytest djfritz djfritz_project
|
make pytest
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
"""
|
|
||||||
Run pytest against local test creation
|
|
||||||
"""
|
|
||||||
|
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
|
|
||||||
try:
|
|
||||||
from django_yunohost_integration.pytest_helper import run_pytest
|
|
||||||
except ImportError as err:
|
|
||||||
raise ImportError('Did you forget to activate a virtual environment?') from err
|
|
||||||
|
|
||||||
|
|
||||||
BASE_PATH = Path(__file__).parent
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
run_pytest(
|
|
||||||
django_settings_path=BASE_PATH / 'conf' / 'settings.py',
|
|
||||||
destination=BASE_PATH / 'local_test',
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
|
@ -8,10 +8,24 @@ domain=$YNH_APP_ARG_DOMAIN
|
||||||
path_url=$YNH_APP_ARG_PATH
|
path_url=$YNH_APP_ARG_PATH
|
||||||
|
|
||||||
admin=$YNH_APP_ARG_ADMIN
|
admin=$YNH_APP_ARG_ADMIN
|
||||||
|
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
# Currently not used: django-fritzconnection has no public pages, yet!
|
#=================================================
|
||||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
# ARGUMENTS FROM CONFIG PANEL
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
# 'debug_enabled' -> '__DEBUG_ENABLED__' -> settings.DEBUG
|
||||||
|
debug_enabled="0"
|
||||||
|
|
||||||
|
# 'log_level' -> '__LOG_LEVEL__' -> settings.LOG_LEVEL
|
||||||
|
log_level="WARNING"
|
||||||
|
|
||||||
|
# 'admin_email' -> '__ADMIN_EMAIL__' add in settings.ADMINS
|
||||||
|
admin_email="${admin}@${domain}"
|
||||||
|
|
||||||
|
# 'default_from_email' -> '__DEFAULT_FROM_EMAIL__' -> settings.DEFAULT_FROM_EMAIL
|
||||||
|
default_from_email="${app}@${domain}"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SET CONSTANTS
|
# SET CONSTANTS
|
||||||
|
@ -20,14 +34,14 @@ is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||||
public_path=/var/www/$app
|
public_path=/var/www/$app
|
||||||
final_path=/opt/yunohost/$app
|
final_path=/opt/yunohost/$app
|
||||||
log_path=/var/log/$app
|
log_path=/var/log/$app
|
||||||
log_file="${log_path}/django-fritzconnection.log"
|
log_file="${log_path}/${app}.log"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# COMMON VARIABLES
|
# COMMON VARIABLES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# dependencies used by the app
|
# dependencies used by the app
|
||||||
pkg_dependencies="build-essential python3-dev python3-pip python3-venv git libpq-dev postgresql postgresql-contrib libjpeg-dev"
|
pkg_dependencies="build-essential python3-dev python3-pip python3-venv git libpq-dev postgresql postgresql-contrib"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# Redis HELPERS
|
# Redis HELPERS
|
||||||
|
@ -71,17 +85,3 @@ ynh_redis_remove_db() {
|
||||||
redis-cli -n "$db" flushall
|
redis-cli -n "$db" flushall
|
||||||
}
|
}
|
||||||
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
# Execute a command as another user
|
|
||||||
# usage: ynh_exec_as USER COMMAND [ARG ...]
|
|
||||||
ynh_exec_as() {
|
|
||||||
local USER=$1
|
|
||||||
shift 1
|
|
||||||
|
|
||||||
if [[ $USER = $(whoami) ]]; then
|
|
||||||
eval "$@"
|
|
||||||
else
|
|
||||||
sudo -u "$USER" "$@"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
|
@ -6,6 +6,9 @@
|
||||||
# IMPORT GENERIC HELPERS
|
# IMPORT GENERIC HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
YNH_APP_ARG_DOMAIN=$YNH_APP_NEW_DOMAIN
|
||||||
|
YNH_APP_ARG_PATH=$YNH_APP_NEW_PATH
|
||||||
|
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
|
@ -30,10 +33,21 @@ final_path=$(ynh_app_setting_get --app="$app" --key=final_path)
|
||||||
log_path=$(ynh_app_setting_get --app="$app" --key=log_path)
|
log_path=$(ynh_app_setting_get --app="$app" --key=log_path)
|
||||||
|
|
||||||
port=$(ynh_app_setting_get --app="$app" --key=port)
|
port=$(ynh_app_setting_get --app="$app" --key=port)
|
||||||
|
|
||||||
db_pwd=$(ynh_app_setting_get --app="$app" --key=psqlpwd)
|
db_pwd=$(ynh_app_setting_get --app="$app" --key=psqlpwd)
|
||||||
admin_mail=$(ynh_user_get_info "$admin" mail)
|
db_name=$(ynh_sanitize_dbid --db_name="$app")
|
||||||
|
db_user=$db_name
|
||||||
|
|
||||||
redis_db=$(ynh_app_setting_get --app="$app" --key=redis_db)
|
redis_db=$(ynh_app_setting_get --app="$app" --key=redis_db)
|
||||||
|
|
||||||
|
#-------------------------------------------------
|
||||||
|
# config_panel.toml settings:
|
||||||
|
|
||||||
|
debug_enabled=$(ynh_app_setting_get --app="$app" --key=debug_enabled)
|
||||||
|
log_level=$(ynh_app_setting_get --app="$app" --key=log_level)
|
||||||
|
admin_email=$(ynh_app_setting_get --app="$app" --key=admin_email)
|
||||||
|
default_from_email=$(ynh_app_setting_get --app="$app" --key=default_from_email)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -72,7 +86,7 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
# STOP SYSTEMD SERVICE
|
# STOP SYSTEMD SERVICE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Stopping systemd services..."
|
ynh_script_progression --message="Stopping systemd service '$app'..."
|
||||||
|
|
||||||
ynh_systemd_action --service_name="$app" --action="stop"
|
ynh_systemd_action --service_name="$app" --action="stop"
|
||||||
|
|
||||||
|
@ -112,36 +126,19 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
# MODIFY SETTINGS
|
# MODIFY SETTINGS
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Modify django-fritzconnection's config file..."
|
ynh_script_progression --message="Modify $app config file..."
|
||||||
|
|
||||||
# save old settings file
|
domain=$YNH_APP_NEW_DOMAIN
|
||||||
settings="$final_path/settings.py"
|
path_url=$YNH_APP_NEW_PATH
|
||||||
ynh_backup_if_checksum_is_different --file="$settings"
|
|
||||||
|
|
||||||
cp "../conf/settings.py" "$settings"
|
ynh_add_config --template="settings.py" --destination="$final_path/settings.py"
|
||||||
|
|
||||||
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$settings"
|
|
||||||
ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$settings"
|
|
||||||
ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="$settings"
|
|
||||||
ynh_replace_string --match_string="__ADMINMAIL__" --replace_string="$admin_mail" --target_file="$settings"
|
|
||||||
ynh_replace_string --match_string="__FINAL_HOME_PATH__" --replace_string="$final_path" --target_file="$settings"
|
|
||||||
ynh_replace_string --match_string="__FINAL_WWW_PATH__" --replace_string="$public_path" --target_file="$settings"
|
|
||||||
ynh_replace_string --match_string="__LOG_FILE__" --replace_string="$log_file" --target_file="$settings"
|
|
||||||
ynh_replace_string --match_string="__REDIS_DB__" --replace_string="$redis_db" --target_file="$settings"
|
|
||||||
|
|
||||||
# Difference to install/upgrade scripts: Use $new_domain and $new_path here:
|
|
||||||
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$new_domain" --target_file="$settings"
|
|
||||||
ynh_replace_string --match_string="__PATH_URL__" --replace_string="$new_path" --target_file="$settings"
|
|
||||||
|
|
||||||
# Recalculate and store the config file checksum into the app settings
|
|
||||||
ynh_store_file_checksum --file="$settings"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALISATION
|
# GENERIC FINALISATION
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Starting systemd services..." --weight=5
|
ynh_script_progression --message="Starting systemd service '$app'..." --weight=5
|
||||||
|
|
||||||
ynh_systemd_action --service_name="$app" --action="start"
|
ynh_systemd_action --service_name="$app" --action="start"
|
||||||
|
|
||||||
|
|
100
scripts/install
100
scripts/install
|
@ -50,19 +50,29 @@ ynh_app_setting_set --app="$app" --key=path --value="$path_url"
|
||||||
# Find a free port
|
# Find a free port
|
||||||
port=$(ynh_find_port --port=8000)
|
port=$(ynh_find_port --port=8000)
|
||||||
# Set port as application setting
|
# Set port as application setting
|
||||||
# https://github.com/YunoHost/yunohost/blob/dev/data/helpers.d/setting
|
# https://yunohost.org/en/contribute/packaging_apps/helpers
|
||||||
|
# https://github.com/YunoHost/yunohost/blob/dev/helpers/setting
|
||||||
ynh_app_setting_set --app="$app" --key=port --value="$port"
|
ynh_app_setting_set --app="$app" --key=port --value="$port"
|
||||||
|
|
||||||
db_pwd=$(ynh_app_setting_get --app="$app" --key=psqlpwd)
|
db_pwd=$(ynh_app_setting_get --app="$app" --key=psqlpwd)
|
||||||
admin_mail=$(ynh_user_get_info --username="$admin" --key=mail)
|
|
||||||
redis_db=$(ynh_redis_get_free_db)
|
redis_db=$(ynh_redis_get_free_db)
|
||||||
|
ynh_app_setting_set --app="$app" --key=redis_db --value="$redis_db"
|
||||||
|
|
||||||
|
#-------------------------------------------------
|
||||||
|
# config_panel.toml settings:
|
||||||
|
|
||||||
|
ynh_app_setting_set --app="$app" --key=debug_enabled --value="$debug_enabled"
|
||||||
|
ynh_app_setting_set --app="$app" --key=log_level --value="$log_level"
|
||||||
|
ynh_app_setting_set --app="$app" --key=admin_email --value="$admin_email"
|
||||||
|
ynh_app_setting_set --app="$app" --key=default_from_email --value="$default_from_email"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD MODIFICATIONS
|
# STANDARD MODIFICATIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
# INSTALL DEPENDENCIES
|
# INSTALL DEPENDENCIES
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Installing dependencies..." --weight=20
|
ynh_script_progression --message="Installing $app dependencies..." --weight=20
|
||||||
|
|
||||||
ynh_exec_warn_less ynh_install_app_dependencies "$pkg_dependencies"
|
ynh_exec_warn_less ynh_install_app_dependencies "$pkg_dependencies"
|
||||||
|
|
||||||
|
@ -86,21 +96,22 @@ ynh_psql_setup_db --db_user="$db_user" --db_name="$db_name"
|
||||||
ynh_script_progression --message="Configuring nginx web server..."
|
ynh_script_progression --message="Configuring nginx web server..."
|
||||||
|
|
||||||
# Create a dedicated nginx config
|
# Create a dedicated nginx config
|
||||||
# https://github.com/YunoHost/yunohost/blob/dev/data/helpers.d/nginx
|
# https://yunohost.org/en/contribute/packaging_apps/helpers
|
||||||
|
# https://github.com/YunoHost/yunohost/blob/dev/helpers/nginx
|
||||||
ynh_add_nginx_config "public_path" "port"
|
ynh_add_nginx_config "public_path" "port"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE DEDICATED USER
|
# CREATE DEDICATED USER
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring system user..."
|
ynh_script_progression --message="Configuring system user '$app'..."
|
||||||
|
|
||||||
# A home directory for venv and settings etc.
|
# A home directory for venv and settings etc.
|
||||||
ynh_system_user_create --username="$app" --home_dir="$final_path" --use_shell
|
ynh_system_user_create --username="$app" --home_dir="$final_path" --use_shell
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# PIP INSTALLATION
|
# PYTHON VIRTUALENV
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Install project via pip..." --weight=50
|
ynh_script_progression --message="Create Python virtualenv..." --weight=5
|
||||||
|
|
||||||
# Always recreate everything fresh with current python version
|
# Always recreate everything fresh with current python version
|
||||||
ynh_secure_remove "${final_path}/venv"
|
ynh_secure_remove "${final_path}/venv"
|
||||||
|
@ -111,6 +122,11 @@ python3 -m venv --without-pip "${final_path}/venv"
|
||||||
cp ../conf/requirements.txt "$final_path/requirements.txt"
|
cp ../conf/requirements.txt "$final_path/requirements.txt"
|
||||||
chown -R "$app:" "$final_path"
|
chown -R "$app:" "$final_path"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# PIP INSTALLATION
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Install project via pip..." --weight=45
|
||||||
|
|
||||||
#run source in a 'sub shell'
|
#run source in a 'sub shell'
|
||||||
(
|
(
|
||||||
set +o nounset
|
set +o nounset
|
||||||
|
@ -124,45 +140,17 @@ chown -R "$app:" "$final_path"
|
||||||
#=================================================
|
#=================================================
|
||||||
# copy config files
|
# copy config files
|
||||||
# ================================================
|
# ================================================
|
||||||
ynh_script_progression --message="Create project configuration files..."
|
ynh_script_progression --message="Create $app configuration files..."
|
||||||
|
|
||||||
gunicorn_conf="$final_path/gunicorn.conf.py"
|
ynh_add_config --template="gunicorn.conf.py" --destination="$final_path/gunicorn.conf.py"
|
||||||
cp "../conf/gunicorn.conf.py" "$gunicorn_conf"
|
|
||||||
ynh_replace_string --match_string="__FINAL_HOME_PATH__" --replace_string="$final_path" --target_file="$gunicorn_conf"
|
|
||||||
ynh_replace_string --match_string="__LOG_FILE__" --replace_string="$log_file" --target_file="$gunicorn_conf"
|
|
||||||
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$gunicorn_conf"
|
|
||||||
ynh_store_file_checksum --file="$gunicorn_conf"
|
|
||||||
|
|
||||||
cp ../conf/manage.py "$final_path/manage.py"
|
ynh_add_config --template="manage.py" --destination="$final_path/manage.py"
|
||||||
ynh_replace_string --match_string="__FINAL_HOME_PATH__" --replace_string="$final_path" --target_file="$final_path/manage.py"
|
|
||||||
ynh_store_file_checksum --file="$final_path/manage.py"
|
|
||||||
chmod +x "$final_path/manage.py"
|
chmod +x "$final_path/manage.py"
|
||||||
|
|
||||||
settings="$final_path/settings.py"
|
ynh_add_config --template="settings.py" --destination="$final_path/settings.py"
|
||||||
cp "../conf/settings.py" "$settings"
|
ynh_add_config --template="setup_user.py" --destination="$final_path/setup_user.py"
|
||||||
|
ynh_add_config --template="urls.py" --destination="$final_path/urls.py"
|
||||||
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$settings"
|
ynh_add_config --template="wsgi.py" --destination="$final_path/wsgi.py"
|
||||||
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$settings"
|
|
||||||
ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$settings"
|
|
||||||
ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$settings"
|
|
||||||
ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="$settings"
|
|
||||||
ynh_replace_string --match_string="__ADMINMAIL__" --replace_string="$admin_mail" --target_file="$settings"
|
|
||||||
ynh_replace_string --match_string="__FINAL_HOME_PATH__" --replace_string="$final_path" --target_file="$settings"
|
|
||||||
ynh_replace_string --match_string="__FINAL_WWW_PATH__" --replace_string="$public_path" --target_file="$settings"
|
|
||||||
ynh_replace_string --match_string="__LOG_FILE__" --replace_string="$log_file" --target_file="$settings"
|
|
||||||
ynh_replace_string --match_string="__REDIS_DB__" --replace_string="$redis_db" --target_file="$settings"
|
|
||||||
|
|
||||||
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$settings"
|
|
||||||
ynh_replace_string --match_string="__PATH_URL__" --replace_string="$path_url" --target_file="$settings"
|
|
||||||
|
|
||||||
# Calculate and store the config file checksum into the app settings
|
|
||||||
ynh_store_file_checksum --file="$settings"
|
|
||||||
|
|
||||||
ynh_app_setting_set --app="$app" --key=redis_db --value="$redis_db"
|
|
||||||
|
|
||||||
cp ../conf/setup_user.py "$final_path/setup_user.py"
|
|
||||||
cp ../conf/urls.py "$final_path/urls.py"
|
|
||||||
cp ../conf/wsgi.py "$final_path/wsgi.py"
|
|
||||||
|
|
||||||
touch "$final_path/local_settings.py"
|
touch "$final_path/local_settings.py"
|
||||||
|
|
||||||
|
@ -180,7 +168,7 @@ cd "$final_path" || exit
|
||||||
./manage.py collectstatic --no-input
|
./manage.py collectstatic --no-input
|
||||||
|
|
||||||
# Create/update Django superuser (set unusable password, because auth done via SSOwat):
|
# Create/update Django superuser (set unusable password, because auth done via SSOwat):
|
||||||
./manage.py create_superuser --username="$admin" --email="$admin_mail"
|
./manage.py create_superuser --username="$admin" --email="$(ynh_user_get_info "$admin" mail)"
|
||||||
|
|
||||||
# Check the configuration
|
# Check the configuration
|
||||||
# This may fail in some cases with errors, etc., but the app works and the user can fix issues later.
|
# This may fail in some cases with errors, etc., but the app works and the user can fix issues later.
|
||||||
|
@ -200,7 +188,7 @@ ynh_use_logrotate "$log_file"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Integrating service in YunoHost..."
|
ynh_script_progression --message="Integrating service in YunoHost..."
|
||||||
|
|
||||||
yunohost service add $app --description="Web based management to catalog things" --log="${log_file}"
|
yunohost service add $app --log="${log_file}"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
|
@ -220,15 +208,29 @@ chmod o-rwx "$final_path"
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SYSTEMD
|
# SETUP SYSTEMD
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring a systemd service..."
|
ynh_script_progression --message="Configuring systemd service '$app'..." --weight=5
|
||||||
|
|
||||||
# https://github.com/YunoHost/yunohost/blob/dev/data/helpers.d/systemd
|
# https://yunohost.org/en/contribute/packaging_apps/helpers
|
||||||
ynh_add_systemd_config --service="$app" --template="django-fritzconnection.service"
|
# https://github.com/YunoHost/yunohost/blob/dev/helpers/systemd
|
||||||
|
ynh_add_systemd_config --service="$app" --template="systemd.service"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# Start django-fritzconnection via systemd
|
# SETUP SSOWAT
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Starting django-fritzconnection's services..." --weight=5
|
ynh_script_progression --message="Configuring SSOwat..."
|
||||||
|
|
||||||
|
# Make app public if necessary or protect it
|
||||||
|
if [ $is_public -eq 1 ]
|
||||||
|
then
|
||||||
|
# Everyone can access the app.
|
||||||
|
# The "main" permission is automatically created before the install script.
|
||||||
|
ynh_permission_update --permission "main" --add "visitors"
|
||||||
|
fi
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# Start the app server via systemd
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Starting systemd service '$app'..." --weight=5
|
||||||
|
|
||||||
ynh_systemd_action --service_name="$app" --action="start"
|
ynh_systemd_action --service_name="$app" --action="start"
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
# STOP PYINVENTORY'S SERVICES
|
# STOP PYINVENTORY'S SERVICES
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Stopping and removing systemd services..." --weight=5
|
ynh_script_progression --message="Stopping and removing systemd service '$app'..." --weight=5
|
||||||
|
|
||||||
ynh_remove_systemd_config --service="$app"
|
ynh_remove_systemd_config --service="$app"
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,8 @@ ynh_abort_if_errors
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Loading settings..."
|
ynh_script_progression --message="Loading settings..."
|
||||||
|
|
||||||
public_path=$(ynh_app_setting_get --app="$app" --key=public_path)
|
|
||||||
final_path=$(ynh_app_setting_get --app="$app" --key=final_path)
|
final_path=$(ynh_app_setting_get --app="$app" --key=final_path)
|
||||||
|
public_path=$(ynh_app_setting_get --app="$app" --key=public_path)
|
||||||
db_name=$(ynh_app_setting_get --app="$app" --key=db_name)
|
db_name=$(ynh_app_setting_get --app="$app" --key=db_name)
|
||||||
db_user=$db_name
|
db_user=$db_name
|
||||||
db_pwd=$(ynh_app_setting_get --app="$app" --key=psqlpwd)
|
db_pwd=$(ynh_app_setting_get --app="$app" --key=psqlpwd)
|
||||||
|
@ -34,8 +34,6 @@ path_url=$(ynh_app_setting_get --app="$app" --key=path)
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Validating restoration parameters..."
|
ynh_script_progression --message="Validating restoration parameters..."
|
||||||
|
|
||||||
ynh_webpath_available --domain=$domain --path_url=$path_url \
|
|
||||||
|| ynh_die --message="Path not available: ${domain}${path_url}"
|
|
||||||
test ! -d $final_path \
|
test ! -d $final_path \
|
||||||
|| ynh_die --message="There is already a directory: $final_path "
|
|| ynh_die --message="There is already a directory: $final_path "
|
||||||
|
|
||||||
|
@ -50,12 +48,10 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE APP MAIN DIR
|
# RESTORE THE APP MAIN DIR
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Restoring the app main directory..."
|
ynh_script_progression --message="Restoring $app main directory..."
|
||||||
|
|
||||||
ynh_restore_file --origin_path="$public_path"
|
|
||||||
ynh_restore_file --origin_path="$final_path"
|
ynh_restore_file --origin_path="$final_path"
|
||||||
|
ynh_restore_file --origin_path="$public_path"
|
||||||
touch "$final_path/local_settings.py"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RECREATE THE DEDICATED USER
|
# RECREATE THE DEDICATED USER
|
||||||
|
@ -83,10 +79,10 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=20
|
||||||
ynh_exec_warn_less ynh_install_app_dependencies "$pkg_dependencies"
|
ynh_exec_warn_less ynh_install_app_dependencies "$pkg_dependencies"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REINSTALL PYTHON VIRTUALENV
|
# PYTHON VIRTUALENV
|
||||||
# Maybe the backup contains a other Python version
|
# Maybe the backup contains a other Python version
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Upgrade Python virtualenv..." --weight=50
|
ynh_script_progression --message="Recreate Python virtualenv..." --weight=5
|
||||||
|
|
||||||
# Always recreate everything fresh with current python version
|
# Always recreate everything fresh with current python version
|
||||||
ynh_secure_remove "${final_path}/venv"
|
ynh_secure_remove "${final_path}/venv"
|
||||||
|
@ -95,6 +91,10 @@ ynh_secure_remove "${final_path}/venv"
|
||||||
python3 -m venv --without-pip "${final_path}/venv"
|
python3 -m venv --without-pip "${final_path}/venv"
|
||||||
chown -R "$app:" "$final_path"
|
chown -R "$app:" "$final_path"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# PIP INSTALLATION
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Install project via pip..." --weight=45
|
||||||
#run source in a 'sub shell'
|
#run source in a 'sub shell'
|
||||||
(
|
(
|
||||||
set +o nounset
|
set +o nounset
|
||||||
|
@ -127,7 +127,7 @@ systemctl enable $app.service --quiet
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Integrating service in YunoHost..."
|
ynh_script_progression --message="Integrating service in YunoHost..."
|
||||||
|
|
||||||
yunohost service add $app --description="Web based management to catalog things" --log="${log_file}"
|
yunohost service add $app --log="${log_file}"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE LOGROTATE CONFIGURATION
|
# RESTORE THE LOGROTATE CONFIGURATION
|
||||||
|
@ -158,7 +158,7 @@ chmod o-rwx "$final_path"
|
||||||
#=================================================
|
#=================================================
|
||||||
# START PYINVENTORY
|
# START PYINVENTORY
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Starting a systemd service..." --weight=5
|
ynh_script_progression --message="Starting systemd service '$app'..." --weight=5
|
||||||
|
|
||||||
ynh_systemd_action --service_name="$app" --action="start"
|
ynh_systemd_action --service_name="$app" --action="start"
|
||||||
|
|
||||||
|
|
104
scripts/upgrade
104
scripts/upgrade
|
@ -26,13 +26,39 @@ db_pwd=$(ynh_app_setting_get --app="$app" --key=psqlpwd)
|
||||||
db_name=$(ynh_sanitize_dbid --db_name="$app")
|
db_name=$(ynh_sanitize_dbid --db_name="$app")
|
||||||
db_user=$db_name
|
db_user=$db_name
|
||||||
|
|
||||||
admin_mail=$(ynh_user_get_info "$admin" mail)
|
|
||||||
redis_db=$(ynh_app_setting_get --app="$app" --key=redis_db)
|
redis_db=$(ynh_app_setting_get --app="$app" --key=redis_db)
|
||||||
|
|
||||||
|
#-------------------------------------------------
|
||||||
|
# config_panel.toml settings:
|
||||||
|
|
||||||
|
debug_enabled=$(ynh_app_setting_get --app="$app" --key=debug_enabled)
|
||||||
|
if [ -z "$debug_enabled" ]; then
|
||||||
|
debug_enabled="0"
|
||||||
|
ynh_app_setting_set --app="$app" --key=debug_enabled --value="$debug_enabled"
|
||||||
|
fi
|
||||||
|
|
||||||
|
log_level=$(ynh_app_setting_get --app="$app" --key=log_level)
|
||||||
|
if [ -z "$log_level" ]; then
|
||||||
|
log_level="WARNING"
|
||||||
|
ynh_app_setting_set --app="$app" --key=log_level --value="$log_level"
|
||||||
|
fi
|
||||||
|
|
||||||
|
admin_email=$(ynh_app_setting_get --app="$app" --key=admin_email)
|
||||||
|
if [ -z "$admin_email" ]; then
|
||||||
|
admin_email="${admin}@${domain}"
|
||||||
|
ynh_app_setting_set --app="$app" --key=admin_email --value="$admin_email"
|
||||||
|
fi
|
||||||
|
|
||||||
|
default_from_email=$(ynh_app_setting_get --app="$app" --key=default_from_email)
|
||||||
|
if [ -z "$default_from_email" ]; then
|
||||||
|
default_from_email="${app}@${domain}"
|
||||||
|
ynh_app_setting_set --app="$app" --key=default_from_email --value="$default_from_email"
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=40
|
ynh_script_progression --message="Backing up $app before upgrading (may take a while)..." --weight=40
|
||||||
|
|
||||||
# Backup the current version of the app
|
# Backup the current version of the app
|
||||||
ynh_backup_before_upgrade
|
ynh_backup_before_upgrade
|
||||||
|
@ -48,7 +74,7 @@ ynh_abort_if_errors
|
||||||
#=================================================
|
#=================================================
|
||||||
# STOP SYSTEMD SERVICE
|
# STOP SYSTEMD SERVICE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Stopping systemd services..." --weight=5
|
ynh_script_progression --message="Stopping systemd service '$app'..." --weight=5
|
||||||
|
|
||||||
ynh_systemd_action --service_name="$app" --action="stop"
|
ynh_systemd_action --service_name="$app" --action="stop"
|
||||||
|
|
||||||
|
@ -58,7 +84,8 @@ ynh_systemd_action --service_name="$app" --action="stop"
|
||||||
ynh_script_progression --message="Upgrading nginx web server configuration..."
|
ynh_script_progression --message="Upgrading nginx web server configuration..."
|
||||||
|
|
||||||
# Create a dedicated nginx config
|
# Create a dedicated nginx config
|
||||||
# https://github.com/YunoHost/yunohost/blob/dev/data/helpers.d/nginx
|
# https://yunohost.org/en/contribute/packaging_apps/helpers
|
||||||
|
# https://github.com/YunoHost/yunohost/blob/dev/helpers/nginx
|
||||||
ynh_add_nginx_config "public_path" "port"
|
ynh_add_nginx_config "public_path" "port"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -81,14 +108,14 @@ ynh_system_user_create --username="$app" --home_dir="$final_path" --use_shell
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SYSTEMD
|
# SETUP SYSTEMD
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring a systemd service..."
|
ynh_script_progression --message="Configuring systemd service '$app'..." --weight=5
|
||||||
|
|
||||||
ynh_add_systemd_config --service="$app" --template="django-fritzconnection.service"
|
ynh_add_systemd_config --service="$app" --template="systemd.service"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPGRADE VENV
|
# PYTHON VIRTUALENV
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Upgrade project via pip..." --weight=50
|
ynh_script_progression --message="Recreate Python virtualenv..." --weight=5
|
||||||
|
|
||||||
# Always recreate everything fresh with current python version
|
# Always recreate everything fresh with current python version
|
||||||
ynh_secure_remove "${final_path}/venv"
|
ynh_secure_remove "${final_path}/venv"
|
||||||
|
@ -99,6 +126,10 @@ python3 -m venv --without-pip "${final_path}/venv"
|
||||||
cp ../conf/requirements.txt "$final_path/requirements.txt"
|
cp ../conf/requirements.txt "$final_path/requirements.txt"
|
||||||
chown -R "$app:" "$final_path"
|
chown -R "$app:" "$final_path"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# PIP INSTALLATION
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Install project via pip..." --weight=45
|
||||||
#run source in a 'sub shell'
|
#run source in a 'sub shell'
|
||||||
(
|
(
|
||||||
set +o nounset
|
set +o nounset
|
||||||
|
@ -114,52 +145,15 @@ chown -R "$app:" "$final_path"
|
||||||
# ================================================
|
# ================================================
|
||||||
ynh_script_progression --message="Create project configuration files..."
|
ynh_script_progression --message="Create project configuration files..."
|
||||||
|
|
||||||
gunicorn_conf="$final_path/gunicorn.conf.py"
|
ynh_add_config --template="gunicorn.conf.py" --destination="$final_path/gunicorn.conf.py"
|
||||||
ynh_backup_if_checksum_is_different --file="$gunicorn_conf"
|
|
||||||
cp "../conf/gunicorn.conf.py" "$gunicorn_conf"
|
|
||||||
ynh_replace_string --match_string="__FINAL_HOME_PATH__" --replace_string="$final_path" --target_file="$gunicorn_conf"
|
|
||||||
ynh_replace_string --match_string="__LOG_FILE__" --replace_string="$log_file" --target_file="$gunicorn_conf"
|
|
||||||
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$gunicorn_conf"
|
|
||||||
ynh_store_file_checksum --file="$gunicorn_conf"
|
|
||||||
|
|
||||||
cp ../conf/manage.py "$final_path/manage.py"
|
ynh_add_config --template="manage.py" --destination="$final_path/manage.py"
|
||||||
ynh_replace_string --match_string="__FINAL_HOME_PATH__" --replace_string="$final_path" --target_file="$final_path/manage.py"
|
|
||||||
ynh_store_file_checksum --file="$final_path/manage.py"
|
|
||||||
chmod +x "$final_path/manage.py"
|
chmod +x "$final_path/manage.py"
|
||||||
|
|
||||||
# save old settings file
|
ynh_add_config --template="settings.py" --destination="$final_path/settings.py"
|
||||||
settings="$final_path/settings.py"
|
ynh_add_config --template="setup_user.py" --destination="$final_path/setup_user.py"
|
||||||
ynh_backup_if_checksum_is_different --file="$settings"
|
ynh_add_config --template="urls.py" --destination="$final_path/urls.py"
|
||||||
|
ynh_add_config --template="wsgi.py" --destination="$final_path/wsgi.py"
|
||||||
cp "../conf/settings.py" "$settings"
|
|
||||||
|
|
||||||
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$settings"
|
|
||||||
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$settings"
|
|
||||||
ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$settings"
|
|
||||||
ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$settings"
|
|
||||||
ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="$settings"
|
|
||||||
ynh_replace_string --match_string="__ADMINMAIL__" --replace_string="$admin_mail" --target_file="$settings"
|
|
||||||
ynh_replace_string --match_string="__FINAL_HOME_PATH__" --replace_string="$final_path" --target_file="$settings"
|
|
||||||
ynh_replace_string --match_string="__FINAL_WWW_PATH__" --replace_string="$public_path" --target_file="$settings"
|
|
||||||
ynh_replace_string --match_string="__LOG_FILE__" --replace_string="$log_file" --target_file="$settings"
|
|
||||||
ynh_replace_string --match_string="__REDIS_DB__" --replace_string="$redis_db" --target_file="$settings"
|
|
||||||
|
|
||||||
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$settings"
|
|
||||||
ynh_replace_string --match_string="__PATH_URL__" --replace_string="$path_url" --target_file="$settings"
|
|
||||||
|
|
||||||
# Recalculate and store the config file checksum into the app settings
|
|
||||||
ynh_store_file_checksum --file="$settings"
|
|
||||||
|
|
||||||
ynh_backup_if_checksum_is_different --file="$final_path/setup_user.py"
|
|
||||||
cp ../conf/setup_user.py "$final_path/setup_user.py"
|
|
||||||
|
|
||||||
ynh_backup_if_checksum_is_different --file="$final_path/urls.py"
|
|
||||||
cp ../conf/urls.py "$final_path/urls.py"
|
|
||||||
|
|
||||||
ynh_backup_if_checksum_is_different --file="$final_path/wsgi.py"
|
|
||||||
cp ../conf/wsgi.py "$final_path/wsgi.py"
|
|
||||||
|
|
||||||
touch "$final_path/local_settings.py"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# MIGRATE PYINVENTORY
|
# MIGRATE PYINVENTORY
|
||||||
|
@ -175,7 +169,7 @@ cd "$final_path" || exit
|
||||||
./manage.py collectstatic --no-input
|
./manage.py collectstatic --no-input
|
||||||
|
|
||||||
# Create/update Django superuser (set unusable password, because auth done via SSOwat):
|
# Create/update Django superuser (set unusable password, because auth done via SSOwat):
|
||||||
./manage.py create_superuser --username="$admin" --email="$admin_mail"
|
./manage.py create_superuser --username="$admin" --email="$(ynh_user_get_info "$admin" mail)"
|
||||||
|
|
||||||
# Check the configuration
|
# Check the configuration
|
||||||
# This may fail in some cases with errors, etc., but the app works and the user can fix issues later.
|
# This may fail in some cases with errors, etc., but the app works and the user can fix issues later.
|
||||||
|
@ -195,7 +189,7 @@ ynh_use_logrotate --non-append
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Integrating service in YunoHost..."
|
ynh_script_progression --message="Integrating service in YunoHost..."
|
||||||
|
|
||||||
yunohost service add $app --description="Web based management to catalog things" --log="${log_file}"
|
yunohost service add $app --log="${log_file}"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
|
@ -213,9 +207,9 @@ chmod o-rwx "$public_path"
|
||||||
chmod o-rwx "$final_path"
|
chmod o-rwx "$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# Start django-fritzconnection via systemd
|
# Start the app server via systemd
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Starting django-fritzconnection's services..." --weight=5
|
ynh_script_progression --message="Starting systemd service '$app'..." --weight=5
|
||||||
|
|
||||||
ynh_systemd_action --service_name="$app" --action="start"
|
ynh_systemd_action --service_name="$app" --action="start"
|
||||||
|
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Test to create the python virtual env and install all requirements.
|
|
||||||
# Note: Maybe you didn't have all OS packages installed ;)
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
final_path="./local_test"
|
|
||||||
|
|
||||||
set -x
|
|
||||||
|
|
||||||
mkdir -p "${final_path}/"
|
|
||||||
python3 -m venv "${final_path}/venv"
|
|
||||||
source "${final_path}/venv/bin/activate"
|
|
||||||
|
|
||||||
$final_path/venv/bin/pip install --upgrade wheel pip
|
|
||||||
$final_path/venv/bin/pip install --no-deps -r "./conf/requirements.txt"
|
|
43
tests/conftest.py
Normal file
43
tests/conftest.py
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
"""
|
||||||
|
Special pytest init:
|
||||||
|
|
||||||
|
- Build a "local_test" YunoHost installation
|
||||||
|
- init Django with this local test installation
|
||||||
|
|
||||||
|
So the pytests will run against this local test installation
|
||||||
|
"""
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
import django
|
||||||
|
from django_yunohost_integration.local_test import create_local_test
|
||||||
|
|
||||||
|
|
||||||
|
BASE_PATH = Path(__file__).parent.parent
|
||||||
|
|
||||||
|
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
|
||||||
|
|
||||||
|
|
||||||
|
def pytest_configure():
|
||||||
|
print('Compile YunoHost files...')
|
||||||
|
final_path = create_local_test(
|
||||||
|
django_settings_path=BASE_PATH / 'conf' / 'settings.py',
|
||||||
|
destination=BASE_PATH / 'local_test',
|
||||||
|
runserver=False,
|
||||||
|
extra_replacements={
|
||||||
|
'__DEBUG_ENABLED__': '0',
|
||||||
|
'__LOG_LEVEL__': 'INFO',
|
||||||
|
'__ADMIN_EMAIL__': 'foo-bar@test.tld',
|
||||||
|
'__DEFAULT_FROM_EMAIL__': 'django_app@test.tld',
|
||||||
|
},
|
||||||
|
)
|
||||||
|
print('Local test files created here:')
|
||||||
|
print(f'"{final_path}"')
|
||||||
|
|
||||||
|
os.chdir(final_path)
|
||||||
|
final_home_str = str(final_path)
|
||||||
|
if final_home_str not in sys.path:
|
||||||
|
sys.path.insert(0, final_home_str)
|
||||||
|
|
||||||
|
django.setup()
|
|
@ -1,14 +1,11 @@
|
||||||
from pathlib import Path
|
from axes.models import AccessLog
|
||||||
|
|
||||||
from bx_django_utils.test_utils.html_assertion import HtmlAssertionMixin
|
from bx_django_utils.test_utils.html_assertion import HtmlAssertionMixin
|
||||||
from django.conf import LazySettings, settings
|
from django.conf import settings
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from django.test import override_settings
|
from django.test import override_settings
|
||||||
from django.test.testcases import TestCase
|
from django.test.testcases import TestCase
|
||||||
from django.urls import NoReverseMatch
|
|
||||||
from django.urls.base import reverse
|
from django.urls.base import reverse
|
||||||
from django_yunohost_integration.test_utils import generate_basic_auth
|
from django_yunohost_integration.test_utils import generate_basic_auth
|
||||||
from django_yunohost_integration.views import request_media_debug_view
|
|
||||||
|
|
||||||
import djfritz
|
import djfritz
|
||||||
|
|
||||||
|
@ -22,61 +19,44 @@ class DjangoYnhTestCase(HtmlAssertionMixin, TestCase):
|
||||||
self.client = self.client_class()
|
self.client = self.client_class()
|
||||||
|
|
||||||
def test_settings(self):
|
def test_settings(self):
|
||||||
assert isinstance(settings, LazySettings)
|
|
||||||
assert settings.configured is True
|
|
||||||
|
|
||||||
assert settings.PATH_URL == 'app_path'
|
assert settings.PATH_URL == 'app_path'
|
||||||
|
|
||||||
def assert_path(path, end_text):
|
assert str(settings.FINALPATH).endswith('/local_test/opt_yunohost')
|
||||||
assert isinstance(path, Path)
|
assert str(settings.PUBLIC_PATH).endswith('/local_test/var_www')
|
||||||
path = str(path)
|
assert str(settings.LOG_FILE).endswith('/local_test/var_log_django-fritzconnection.log')
|
||||||
assert path.endswith(end_text)
|
|
||||||
|
|
||||||
assert_path(settings.FINAL_HOME_PATH, '/local_test/opt_yunohost')
|
|
||||||
assert_path(settings.FINAL_WWW_PATH, '/local_test/var_www')
|
|
||||||
assert_path(settings.LOG_FILE, '/local_test/var_log_django-fritzconnection.log')
|
|
||||||
|
|
||||||
assert settings.ROOT_URLCONF == 'urls'
|
assert settings.ROOT_URLCONF == 'urls'
|
||||||
|
|
||||||
def test_urls(self):
|
def test_config_panel_settings(self):
|
||||||
assert reverse('admin:index') == '/app_path/admin/'
|
# config_panel.toml settings, set via tests.conftest.pytest_configure():
|
||||||
|
assert settings.DEBUG_ENABLED == '0' and settings.DEBUG is False
|
||||||
# The django_yunohost_integration debug view should not be available:
|
assert settings.LOG_LEVEL == 'INFO'
|
||||||
with self.assertRaises(NoReverseMatch):
|
assert settings.ADMIN_EMAIL == 'foo-bar@test.tld'
|
||||||
reverse(request_media_debug_view)
|
assert settings.DEFAULT_FROM_EMAIL == 'django_app@test.tld'
|
||||||
|
|
||||||
def test_auth(self):
|
def test_auth(self):
|
||||||
|
assert settings.PATH_URL == 'app_path'
|
||||||
|
assert reverse('admin:index') == '/app_path/admin/'
|
||||||
|
|
||||||
# SecurityMiddleware should redirects all non-HTTPS requests to HTTPS:
|
# SecurityMiddleware should redirects all non-HTTPS requests to HTTPS:
|
||||||
assert settings.SECURE_SSL_REDIRECT is True
|
assert settings.SECURE_SSL_REDIRECT is True
|
||||||
response = self.client.get('/app_path/', secure=False)
|
response = self.client.get('/app_path/admin/', secure=False)
|
||||||
self.assertRedirects(
|
self.assertRedirects(
|
||||||
response,
|
response,
|
||||||
status_code=301, # permanent redirect
|
status_code=301, # permanent redirect
|
||||||
expected_url='https://testserver/app_path/',
|
expected_url='https://testserver/app_path/admin/',
|
||||||
fetch_redirect_response=False,
|
|
||||||
)
|
|
||||||
|
|
||||||
response = self.client.get('/app_path/', secure=True)
|
|
||||||
self.assertRedirects(
|
|
||||||
response, expected_url='/app_path/group_management/', fetch_redirect_response=False
|
|
||||||
)
|
|
||||||
|
|
||||||
response = self.client.get('/app_path/group_management/', secure=True)
|
|
||||||
self.assertRedirects(
|
|
||||||
response,
|
|
||||||
expected_url='/app_path/admin/login/?next=/app_path/group_management/',
|
|
||||||
fetch_redirect_response=False,
|
fetch_redirect_response=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
response = self.client.get('/app_path/admin/', secure=True)
|
response = self.client.get('/app_path/admin/', secure=True)
|
||||||
self.assertRedirects(
|
self.assertRedirects(
|
||||||
response,
|
response,
|
||||||
expected_url='/app_path/admin/login/?next=/app_path/admin/',
|
expected_url='/app_path/admin/login/?next=%2Fapp_path%2Fadmin%2F',
|
||||||
fetch_redirect_response=False,
|
fetch_redirect_response=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
@override_settings(SECURE_SSL_REDIRECT=False)
|
|
||||||
def test_create_unknown_user(self):
|
def test_create_unknown_user(self):
|
||||||
|
assert reverse('admin:index') == '/app_path/admin/'
|
||||||
assert User.objects.count() == 0
|
assert User.objects.count() == 0
|
||||||
|
|
||||||
self.client.cookies['SSOwAuthUser'] = 'test'
|
self.client.cookies['SSOwAuthUser'] = 'test'
|
||||||
|
@ -86,16 +66,16 @@ class DjangoYnhTestCase(HtmlAssertionMixin, TestCase):
|
||||||
HTTP_REMOTE_USER='test',
|
HTTP_REMOTE_USER='test',
|
||||||
HTTP_AUTH_USER='test',
|
HTTP_AUTH_USER='test',
|
||||||
HTTP_AUTHORIZATION='basic dGVzdDp0ZXN0MTIz',
|
HTTP_AUTHORIZATION='basic dGVzdDp0ZXN0MTIz',
|
||||||
|
secure=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
assert User.objects.count() == 1
|
assert User.objects.count() == 1
|
||||||
user = User.objects.first()
|
user = User.objects.first()
|
||||||
assert user.username == 'test'
|
assert user.username == 'test'
|
||||||
assert user.is_active is True
|
assert user.is_active is True
|
||||||
assert user.is_staff is True # Set by: django_yunohost_integration
|
assert user.is_staff is True # Set by: conf.setup_user.setup_project_user
|
||||||
assert user.is_superuser is False
|
assert user.is_superuser is False
|
||||||
|
|
||||||
assert response.status_code == 200
|
|
||||||
self.assert_html_parts(
|
self.assert_html_parts(
|
||||||
response,
|
response,
|
||||||
parts=(
|
parts=(
|
||||||
|
@ -107,70 +87,79 @@ class DjangoYnhTestCase(HtmlAssertionMixin, TestCase):
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
@override_settings(SECURE_SSL_REDIRECT=False)
|
|
||||||
def test_wrong_auth_user(self):
|
def test_wrong_auth_user(self):
|
||||||
assert User.objects.count() == 0
|
assert User.objects.count() == 0
|
||||||
|
assert AccessLog.objects.count() == 0
|
||||||
|
|
||||||
self.client.cookies['SSOwAuthUser'] = 'test'
|
self.client.cookies['SSOwAuthUser'] = 'test'
|
||||||
|
|
||||||
response = self.client.get(
|
response = self.client.get(
|
||||||
path='/app_path/admin/',
|
path='/app_path/',
|
||||||
HTTP_REMOTE_USER='test',
|
HTTP_REMOTE_USER='test',
|
||||||
HTTP_AUTH_USER='foobar', # <<< wrong user name
|
HTTP_AUTH_USER='foobar', # <<< wrong user name
|
||||||
HTTP_AUTHORIZATION='basic dGVzdDp0ZXN0MTIz',
|
HTTP_AUTHORIZATION='basic dGVzdDp0ZXN0MTIz',
|
||||||
|
secure=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
assert User.objects.count() == 1
|
assert User.objects.count() == 1
|
||||||
user = User.objects.first()
|
user = User.objects.first()
|
||||||
assert user.username == 'test'
|
assert user.username == 'test'
|
||||||
assert user.is_active is True
|
assert user.is_active is True
|
||||||
assert user.is_staff is True # Set by: django_yunohost_integration
|
assert user.is_staff is True # Set by: conf.setup_user.setup_project_user
|
||||||
assert user.is_superuser is False
|
assert user.is_superuser is False
|
||||||
|
|
||||||
|
assert AccessLog.objects.count() == 1
|
||||||
|
|
||||||
assert response.status_code == 403 # Forbidden
|
assert response.status_code == 403 # Forbidden
|
||||||
|
|
||||||
@override_settings(SECURE_SSL_REDIRECT=False)
|
|
||||||
def test_wrong_cookie(self):
|
def test_wrong_cookie(self):
|
||||||
assert User.objects.count() == 0
|
assert User.objects.count() == 0
|
||||||
|
assert AccessLog.objects.count() == 0
|
||||||
|
|
||||||
self.client.cookies['SSOwAuthUser'] = 'foobar' # <<< wrong user name
|
self.client.cookies['SSOwAuthUser'] = 'foobar' # <<< wrong user name
|
||||||
|
|
||||||
response = self.client.get(
|
response = self.client.get(
|
||||||
path='/app_path/admin/',
|
path='/app_path/',
|
||||||
HTTP_REMOTE_USER='test',
|
HTTP_REMOTE_USER='test',
|
||||||
HTTP_AUTH_USER='test',
|
HTTP_AUTH_USER='test',
|
||||||
HTTP_AUTHORIZATION='basic dGVzdDp0ZXN0MTIz',
|
HTTP_AUTHORIZATION='basic dGVzdDp0ZXN0MTIz',
|
||||||
|
secure=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
assert User.objects.count() == 1
|
assert User.objects.count() == 1
|
||||||
user = User.objects.first()
|
user = User.objects.first()
|
||||||
assert user.username == 'test'
|
assert user.username == 'test'
|
||||||
assert user.is_active is True
|
assert user.is_active is True
|
||||||
assert user.is_staff is True # Set by: django_yunohost_integration
|
assert user.is_staff is True # Set by: conf.setup_user.setup_project_user
|
||||||
assert user.is_superuser is False
|
assert user.is_superuser is False
|
||||||
|
|
||||||
|
assert AccessLog.objects.count() == 1
|
||||||
|
|
||||||
assert response.status_code == 403 # Forbidden
|
assert response.status_code == 403 # Forbidden
|
||||||
|
|
||||||
@override_settings(SECURE_SSL_REDIRECT=False)
|
|
||||||
def test_wrong_authorization_user(self):
|
def test_wrong_authorization_user(self):
|
||||||
assert User.objects.count() == 0
|
assert User.objects.count() == 0
|
||||||
|
|
||||||
self.client.cookies['SSOwAuthUser'] = 'test'
|
self.client.cookies['SSOwAuthUser'] = 'test'
|
||||||
|
|
||||||
response = self.client.get(
|
response = self.client.get(
|
||||||
path='/app_path/admin/',
|
path='/app_path/',
|
||||||
HTTP_REMOTE_USER='test',
|
HTTP_REMOTE_USER='test',
|
||||||
HTTP_AUTH_USER='test',
|
HTTP_AUTH_USER='test',
|
||||||
HTTP_AUTHORIZATION=generate_basic_auth(
|
HTTP_AUTHORIZATION=generate_basic_auth(
|
||||||
username='foobar', password='test123'
|
username='foobar', # <<< wrong user name
|
||||||
), # <<< wrong user name
|
password='test123',
|
||||||
|
),
|
||||||
|
secure=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
assert User.objects.count() == 1
|
assert User.objects.count() == 1
|
||||||
user = User.objects.first()
|
user = User.objects.first()
|
||||||
assert user.username == 'test'
|
assert user.username == 'test'
|
||||||
assert user.is_active is True
|
assert user.is_active is True
|
||||||
assert user.is_staff is True # Set by: django_yunohost_integration
|
assert user.is_staff is True # Set by: conf.setup_user.setup_project_user
|
||||||
assert user.is_superuser is False
|
assert user.is_superuser is False
|
||||||
|
|
||||||
|
assert AccessLog.objects.count() == 1
|
||||||
|
|
||||||
assert response.status_code == 403 # Forbidden
|
assert response.status_code == 403 # Forbidden
|
||||||
|
|
|
@ -4,8 +4,10 @@ import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
import tomli
|
||||||
from bx_django_utils.filename import clean_filename
|
from bx_django_utils.filename import clean_filename
|
||||||
from bx_py_utils.path import assert_is_dir, assert_is_file
|
from bx_py_utils.path import assert_is_dir, assert_is_file
|
||||||
|
from django_yunohost_integration.test_utils import assert_project_version
|
||||||
|
|
||||||
import djfritz
|
import djfritz
|
||||||
|
|
||||||
|
@ -22,13 +24,25 @@ def assert_file_contains_string(file_path, string):
|
||||||
|
|
||||||
|
|
||||||
def test_version():
|
def test_version():
|
||||||
version = djfritz.__version__
|
upstream_version = djfritz.__version__
|
||||||
|
|
||||||
|
assert_project_version(
|
||||||
|
current_version=upstream_version,
|
||||||
|
github_project_url='https://github.com/jedie/django-fritzconnection',
|
||||||
|
)
|
||||||
|
|
||||||
|
pyproject_toml_path = Path(PACKAGE_ROOT, 'pyproject.toml')
|
||||||
|
pyproject_toml = tomli.loads(pyproject_toml_path.read_text(encoding='UTF-8'))
|
||||||
|
pyproject_version = pyproject_toml['tool']['poetry']['version']
|
||||||
|
assert pyproject_version.startswith(f'{upstream_version}+ynh')
|
||||||
|
|
||||||
|
# pyproject.toml needs a PEP 440 conform version and used "+ynh"
|
||||||
|
# the YunoHost syntax is: "~ynh", just "convert this:
|
||||||
|
manifest_version = pyproject_version.replace('+', '~')
|
||||||
|
|
||||||
assert_file_contains_string(
|
assert_file_contains_string(
|
||||||
file_path=Path(PACKAGE_ROOT, 'pyproject.toml'), string=f'version = "{version}~ynh'
|
file_path=Path(PACKAGE_ROOT, 'manifest.json'),
|
||||||
)
|
string=f'"version": "{manifest_version}"',
|
||||||
assert_file_contains_string(
|
|
||||||
file_path=Path(PACKAGE_ROOT, 'manifest.json'), string=f'"version": "{version}~ynh'
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,7 +51,7 @@ def poetry_check_output(*args):
|
||||||
|
|
||||||
output = subprocess.check_output(
|
output = subprocess.check_output(
|
||||||
(poerty_bin,) + args,
|
(poerty_bin,) + args,
|
||||||
universal_newlines=True,
|
text=True,
|
||||||
env=os.environ,
|
env=os.environ,
|
||||||
stderr=subprocess.STDOUT,
|
stderr=subprocess.STDOUT,
|
||||||
cwd=str(PACKAGE_ROOT),
|
cwd=str(PACKAGE_ROOT),
|
||||||
|
@ -52,7 +66,7 @@ def test_poetry_check():
|
||||||
|
|
||||||
|
|
||||||
def test_requirements_txt():
|
def test_requirements_txt():
|
||||||
requirements_txt = Path('conf', 'requirements.txt')
|
requirements_txt = PACKAGE_ROOT / 'conf' / 'requirements.txt'
|
||||||
assert_is_file(requirements_txt)
|
assert_is_file(requirements_txt)
|
||||||
|
|
||||||
output = poetry_check_output('export', '-f', 'requirements.txt')
|
output = poetry_check_output('export', '-f', 'requirements.txt')
|
||||||
|
@ -81,6 +95,8 @@ def test_screenshot_filenames():
|
||||||
renamed = []
|
renamed = []
|
||||||
for file_path in screenshot_path.iterdir():
|
for file_path in screenshot_path.iterdir():
|
||||||
file_name = file_path.name
|
file_name = file_path.name
|
||||||
|
if file_name.startswith('.'):
|
||||||
|
continue
|
||||||
cleaned_name = clean_filename(file_name)
|
cleaned_name = clean_filename(file_name)
|
||||||
if cleaned_name != file_name:
|
if cleaned_name != file_name:
|
||||||
new_path = file_path.with_name(cleaned_name)
|
new_path = file_path.with_name(cleaned_name)
|
||||||
|
|
Loading…
Reference in a new issue