Auto-update README

This commit is contained in:
yunohost-bot 2023-08-22 06:39:17 +00:00
parent bfc7fecea7
commit ac34888d32
2 changed files with 111 additions and 83 deletions

View file

@ -33,7 +33,7 @@ To demonstrate the functionality the small [django-example](https://github.com/j
Pull requests welcome ;)
**Shipped version:** 0.2.0~ynh1
**Shipped version:** 0.2.0~ynh2
## Disclaimers / important information
## local test
@ -44,9 +44,9 @@ and urls made for YunoHost installation.
e.g.:
```bash
~$ git clone https://github.com/YunoHost-Apps/django_example_ynh.git
~$ git clone https://github.com/YunoHost-Apps/django_example.git
~$ cd django_example_ynh/
~/django_example_ynh$ make
~/django_example$ make
install-poetry install or update poetry
install install project via poetry
update update the sources and installation and generate "conf/requirements.txt"
@ -59,9 +59,9 @@ publish Release new version to PyPi
local-test Run local_test.py to run the project locally
local-diff-settings Run "manage.py diffsettings" with local test
~/django_example_ynh$ make install-poetry
~/django_example_ynh$ make install
~/django_example_ynh$ make local-test
~/django_example$ make install-poetry
~/django_example$ make install
~/django_example$ make local-test
```
Notes:
@ -73,48 +73,48 @@ Notes:
## history
* [compare v0.1.5...master](https://github.com/YunoHost-Apps/django_example_ynh/compare/v0.2.0...master) **dev**
* [compare v0.1.5...master](https://github.com/YunoHost-Apps/django_example/compare/v0.2.0...master) **dev**
* tbc
* [v0.2.0 - 15.09.2021](https://github.com/YunoHost-Apps/django_example_ynh/compare/v0.1.5...v0.2.0)
* [v0.2.0 - 15.09.2021](https://github.com/YunoHost-Apps/django_example/compare/v0.1.5...v0.2.0)
* rename/split `django_example_ynh` into:
* [django_yunohost_integration](https://github.com/jedie/django_yunohost_integration) - Python package with the glue code to integrate a Django project with YunoHost
* [django_example_ynh](https://github.com/YunoHost-Apps/django_example_ynh) - Demo YunoHost App to demonstrate the integration of a Django project under YunoHost
* [v0.1.5 - 19.01.2021](https://github.com/YunoHost-Apps/django_example_ynh/compare/v0.1.4...v0.1.5)
* [django_example_ynh](https://github.com/YunoHost-Apps/django_example) - Demo YunoHost App to demonstrate the integration of a Django project under YunoHost
* [v0.1.5 - 19.01.2021](https://github.com/YunoHost-Apps/django_example/compare/v0.1.4...v0.1.5)
* Make some deps `gunicorn`, `psycopg2-binary`, `django-redis`, `django-axes` optional
* [v0.1.4 - 08.01.2021](https://github.com/YunoHost-Apps/django_example_ynh/compare/v0.1.3...v0.1.4)
* Bugfix [CSRF verification failed on POST requests #7](https://github.com/YunoHost-Apps/django_example_ynh/issues/7)
* [v0.1.3 - 08.01.2021](https://github.com/YunoHost-Apps/django_example_ynh/compare/v0.1.2...v0.1.3)
* [v0.1.4 - 08.01.2021](https://github.com/YunoHost-Apps/django_example/compare/v0.1.3...v0.1.4)
* Bugfix [CSRF verification failed on POST requests #7](https://github.com/YunoHost-Apps/django_example/issues/7)
* [v0.1.3 - 08.01.2021](https://github.com/YunoHost-Apps/django_example/compare/v0.1.2...v0.1.3)
* set "DEBUG = True" in local_test (so static files are served and auth works)
* Bugfixes and cleanups
* [v0.1.2 - 29.12.2020](https://github.com/YunoHost-Apps/django_example_ynh/compare/v0.1.1...v0.1.2)
* [v0.1.2 - 29.12.2020](https://github.com/YunoHost-Apps/django_example/compare/v0.1.1...v0.1.2)
* Bugfixes
* [v0.1.1 - 29.12.2020](https://github.com/YunoHost-Apps/django_example_ynh/compare/v0.1.0...v0.1.1)
* [v0.1.1 - 29.12.2020](https://github.com/YunoHost-Apps/django_example/compare/v0.1.0...v0.1.1)
* Refactor "create_superuser" to a manage command, useable via "django_example_ynh" in `INSTALLED_APPS`
* Generate "conf/requirements.txt" and use this file for install
* rename own settings and urls (in `/conf/`)
* [v0.1.0 - 28.12.2020](https://github.com/YunoHost-Apps/django_example_ynh/compare/f578f14...v0.1.0)
* [v0.1.0 - 28.12.2020](https://github.com/YunoHost-Apps/django_example/compare/f578f14...v0.1.0)
* first working state
* [23.12.2020](https://github.com/YunoHost-Apps/django_example_ynh/commit/f578f144a3a6d11d7044597c37d550d29c247773)
* [23.12.2020](https://github.com/YunoHost-Apps/django_example/commit/f578f144a3a6d11d7044597c37d550d29c247773)
* init the project
## Links
* Report a bug about this package: https://github.com/YunoHost-Apps/django_example_ynh
* Report a bug about this package: https://github.com/YunoHost-Apps/django_example
* YunoHost website: https://yunohost.org/
* PyPi package: https://pypi.org/project/django-ynh/
These projects used `django_example_ynh`:
* https://github.com/YunoHost-Apps/django_example_ynh
* https://github.com/YunoHost-Apps/django_example
* https://github.com/YunoHost-Apps/django-for-runners_ynh
---
# Developer info
The App project will be stored under `__DATA_DIR__` (e.g.: `/home/yunohost.app/$app`) that's Django's `settings.DATA_DIR_PATH`
"static" / "media" files to serve via nginx are under `__PUBLIC_PATH__` (e.g.: `/var/www/$app`) that's `settings.PUBLIC_PATH`
The App project will be stored under `__DATA_DIR__` (e.g.: `/home/yunohost.app/$app/`) that's Django's `settings.DATA_DIR_PATH`
"static" / "media" files to serve via nginx are under `__INSTALL_DIR__` (e.g.: `/var/www/$app/`) that's `settings.INSTALL_DIR_PATH`
## package installation / debugging
@ -127,38 +127,46 @@ To update:
```bash
~# cd django_example_ynh
~/django_example_ynh# git fetch && git reset --hard origin/testing
~/django_example_ynh# yunohost app upgrade django_example_ynh -u . -F
~/django_example_ynh# yunohost app upgrade django_example -u . -F
```
To remove call e.g.:
```bash
sudo yunohost app remove django_example_ynh
sudo yunohost app remove django_example
```
Backup / remove / restore cycle, e.g.:
```bash
yunohost backup create --apps django_example_ynh
yunohost backup create --apps django_example
yunohost backup list
archives:
- django_example_ynh-pre-upgrade1
- 20201223-163434
yunohost app remove django_example_ynh
yunohost backup restore 20201223-163434 --apps django_example_ynh
- 20230822-062848
yunohost app remove django_example
yunohost backup restore 20230822-062848 --apps django_example
```
Debug the installation, e.g.:
```bash
root@yunohost:~# cat /etc/yunohost/apps/django_example_ynh/settings.yml
root@yunohost:~# cat /etc/yunohost/apps/django_example/settings.yml
...
app: django_example
...
data_dir: /home/yunohost.app/django_example
...
install_dir: /var/www/django_example
...
log_file: /var/log/django_example/django_example.log
...
root@yunohost:~# ls -la /var/www/django_example_ynh/
root@yunohost:~# ls -la /var/www/django_example/
total 18
drwxr-xr-x 4 root root 4 Dec 8 08:36 .
drwxr-xr-x 6 root root 6 Dec 8 08:36 ..
drwxr-xr-x 2 root root 2 Dec 8 08:36 media
drwxr-xr-x 7 root root 8 Dec 8 08:40 static
root@yunohost:~# ls -la /home/yunohost.app/django_example_ynh/
root@yunohost:~# ls -la /home/yunohost.app/django_example/
total 58
drwxr-xr-x 5 django_example_ynh django_example_ynh 11 Dec 8 08:39 .
drwxr-xr-x 3 root root 3 Dec 8 08:36 ..
@ -170,21 +178,27 @@ drwxr-xr-x 6 django_example_ynh django_example_ynh 6 Dec 8 08:37 venv
-rw-r--r-- 1 django_example_ynh django_example_ynh 115 Dec 8 08:39 wsgi.py
-rw-r--r-- 1 django_example_ynh django_example_ynh 4737 Dec 8 08:39 django_example_ynh_demo_settings.py
root@yunohost:~# cd /home/yunohost.app/django_example_ynh/
root@yunohost:/home/yunohost.app/django_example_ynh# source venv/bin/activate
(venv) root@yunohost:/home/yunohost.app/django_example_ynh# ./manage.py check
django_example_ynh v0.8.2 (Django v2.2.17)
DJANGO_SETTINGS_MODULE='django_example_ynh_demo_settings'
PROJECT_PATH:/home/yunohost.app/django_example_ynh/venv/lib/python3.7/site-packages
BASE_PATH:/home/yunohost.app/django_example_ynh
root@yunohost:~# /home/yunohost.app/django_example/manage.py diffsettings
...
root@yunohost:~# /home/yunohost.app/django_example/manage.py check
ENV_TYPE:None
PROJECT_PATH:/home/yunohost.app/django_example/venv/lib/python3.9/site-packages
BASE_PATH:/root/django_example
System check identified no issues (0 silenced).
root@yunohost:~# tail -f /var/log/django_example_ynh/django_example_ynh.log
root@yunohost:~# cat /etc/systemd/system/systemd.service
root@yunohost:~# cat /etc/systemd/system/django_example.service
...
root@yunohost:~# systemctl reload-or-restart django_example_ynh
root@yunohost:~# journalctl --unit=django_example_ynh --follow
root@yunohost:~# systemctl reload-or-restart django_example
root@yunohost:~# journalctl --unit=django_example --follow
...
root@yunohost:~# tail -f /var/log/django_example/django_example.log
...
root@yunohost:~# tail -f /var/log/nginx/*.log
...
root@yunohost:~# ls -la /etc/nginx/conf.d/
root@yunohost:~# cat /etc/nginx/conf.d/$domain.d/django_example.conf
```

View file

@ -33,7 +33,7 @@ To demonstrate the functionality the small [django-example](https://github.com/j
Pull requests welcome ;)
**Version incluse :** 0.2.0~ynh1
**Version incluse :** 0.2.0~ynh2
## Avertissements / informations importantes
## local test
@ -44,9 +44,9 @@ and urls made for YunoHost installation.
e.g.:
```bash
~$ git clone https://github.com/YunoHost-Apps/django_example_ynh.git
~$ git clone https://github.com/YunoHost-Apps/django_example.git
~$ cd django_example_ynh/
~/django_example_ynh$ make
~/django_example$ make
install-poetry install or update poetry
install install project via poetry
update update the sources and installation and generate "conf/requirements.txt"
@ -59,9 +59,9 @@ publish Release new version to PyPi
local-test Run local_test.py to run the project locally
local-diff-settings Run "manage.py diffsettings" with local test
~/django_example_ynh$ make install-poetry
~/django_example_ynh$ make install
~/django_example_ynh$ make local-test
~/django_example$ make install-poetry
~/django_example$ make install
~/django_example$ make local-test
```
Notes:
@ -73,48 +73,48 @@ Notes:
## history
* [compare v0.1.5...master](https://github.com/YunoHost-Apps/django_example_ynh/compare/v0.2.0...master) **dev**
* [compare v0.1.5...master](https://github.com/YunoHost-Apps/django_example/compare/v0.2.0...master) **dev**
* tbc
* [v0.2.0 - 15.09.2021](https://github.com/YunoHost-Apps/django_example_ynh/compare/v0.1.5...v0.2.0)
* [v0.2.0 - 15.09.2021](https://github.com/YunoHost-Apps/django_example/compare/v0.1.5...v0.2.0)
* rename/split `django_example_ynh` into:
* [django_yunohost_integration](https://github.com/jedie/django_yunohost_integration) - Python package with the glue code to integrate a Django project with YunoHost
* [django_example_ynh](https://github.com/YunoHost-Apps/django_example_ynh) - Demo YunoHost App to demonstrate the integration of a Django project under YunoHost
* [v0.1.5 - 19.01.2021](https://github.com/YunoHost-Apps/django_example_ynh/compare/v0.1.4...v0.1.5)
* [django_example_ynh](https://github.com/YunoHost-Apps/django_example) - Demo YunoHost App to demonstrate the integration of a Django project under YunoHost
* [v0.1.5 - 19.01.2021](https://github.com/YunoHost-Apps/django_example/compare/v0.1.4...v0.1.5)
* Make some deps `gunicorn`, `psycopg2-binary`, `django-redis`, `django-axes` optional
* [v0.1.4 - 08.01.2021](https://github.com/YunoHost-Apps/django_example_ynh/compare/v0.1.3...v0.1.4)
* Bugfix [CSRF verification failed on POST requests #7](https://github.com/YunoHost-Apps/django_example_ynh/issues/7)
* [v0.1.3 - 08.01.2021](https://github.com/YunoHost-Apps/django_example_ynh/compare/v0.1.2...v0.1.3)
* [v0.1.4 - 08.01.2021](https://github.com/YunoHost-Apps/django_example/compare/v0.1.3...v0.1.4)
* Bugfix [CSRF verification failed on POST requests #7](https://github.com/YunoHost-Apps/django_example/issues/7)
* [v0.1.3 - 08.01.2021](https://github.com/YunoHost-Apps/django_example/compare/v0.1.2...v0.1.3)
* set "DEBUG = True" in local_test (so static files are served and auth works)
* Bugfixes and cleanups
* [v0.1.2 - 29.12.2020](https://github.com/YunoHost-Apps/django_example_ynh/compare/v0.1.1...v0.1.2)
* [v0.1.2 - 29.12.2020](https://github.com/YunoHost-Apps/django_example/compare/v0.1.1...v0.1.2)
* Bugfixes
* [v0.1.1 - 29.12.2020](https://github.com/YunoHost-Apps/django_example_ynh/compare/v0.1.0...v0.1.1)
* [v0.1.1 - 29.12.2020](https://github.com/YunoHost-Apps/django_example/compare/v0.1.0...v0.1.1)
* Refactor "create_superuser" to a manage command, useable via "django_example_ynh" in `INSTALLED_APPS`
* Generate "conf/requirements.txt" and use this file for install
* rename own settings and urls (in `/conf/`)
* [v0.1.0 - 28.12.2020](https://github.com/YunoHost-Apps/django_example_ynh/compare/f578f14...v0.1.0)
* [v0.1.0 - 28.12.2020](https://github.com/YunoHost-Apps/django_example/compare/f578f14...v0.1.0)
* first working state
* [23.12.2020](https://github.com/YunoHost-Apps/django_example_ynh/commit/f578f144a3a6d11d7044597c37d550d29c247773)
* [23.12.2020](https://github.com/YunoHost-Apps/django_example/commit/f578f144a3a6d11d7044597c37d550d29c247773)
* init the project
## Links
* Report a bug about this package: https://github.com/YunoHost-Apps/django_example_ynh
* Report a bug about this package: https://github.com/YunoHost-Apps/django_example
* YunoHost website: https://yunohost.org/
* PyPi package: https://pypi.org/project/django-ynh/
These projects used `django_example_ynh`:
* https://github.com/YunoHost-Apps/django_example_ynh
* https://github.com/YunoHost-Apps/django_example
* https://github.com/YunoHost-Apps/django-for-runners_ynh
---
# Developer info
The App project will be stored under `__DATA_DIR__` (e.g.: `/home/yunohost.app/$app`) that's Django's `settings.DATA_DIR_PATH`
"static" / "media" files to serve via nginx are under `__PUBLIC_PATH__` (e.g.: `/var/www/$app`) that's `settings.PUBLIC_PATH`
The App project will be stored under `__DATA_DIR__` (e.g.: `/home/yunohost.app/$app/`) that's Django's `settings.DATA_DIR_PATH`
"static" / "media" files to serve via nginx are under `__INSTALL_DIR__` (e.g.: `/var/www/$app/`) that's `settings.INSTALL_DIR_PATH`
## package installation / debugging
@ -127,38 +127,46 @@ To update:
```bash
~# cd django_example_ynh
~/django_example_ynh# git fetch && git reset --hard origin/testing
~/django_example_ynh# yunohost app upgrade django_example_ynh -u . -F
~/django_example_ynh# yunohost app upgrade django_example -u . -F
```
To remove call e.g.:
```bash
sudo yunohost app remove django_example_ynh
sudo yunohost app remove django_example
```
Backup / remove / restore cycle, e.g.:
```bash
yunohost backup create --apps django_example_ynh
yunohost backup create --apps django_example
yunohost backup list
archives:
- django_example_ynh-pre-upgrade1
- 20201223-163434
yunohost app remove django_example_ynh
yunohost backup restore 20201223-163434 --apps django_example_ynh
- 20230822-062848
yunohost app remove django_example
yunohost backup restore 20230822-062848 --apps django_example
```
Debug the installation, e.g.:
```bash
root@yunohost:~# cat /etc/yunohost/apps/django_example_ynh/settings.yml
root@yunohost:~# cat /etc/yunohost/apps/django_example/settings.yml
...
app: django_example
...
data_dir: /home/yunohost.app/django_example
...
install_dir: /var/www/django_example
...
log_file: /var/log/django_example/django_example.log
...
root@yunohost:~# ls -la /var/www/django_example_ynh/
root@yunohost:~# ls -la /var/www/django_example/
total 18
drwxr-xr-x 4 root root 4 Dec 8 08:36 .
drwxr-xr-x 6 root root 6 Dec 8 08:36 ..
drwxr-xr-x 2 root root 2 Dec 8 08:36 media
drwxr-xr-x 7 root root 8 Dec 8 08:40 static
root@yunohost:~# ls -la /home/yunohost.app/django_example_ynh/
root@yunohost:~# ls -la /home/yunohost.app/django_example/
total 58
drwxr-xr-x 5 django_example_ynh django_example_ynh 11 Dec 8 08:39 .
drwxr-xr-x 3 root root 3 Dec 8 08:36 ..
@ -170,21 +178,27 @@ drwxr-xr-x 6 django_example_ynh django_example_ynh 6 Dec 8 08:37 venv
-rw-r--r-- 1 django_example_ynh django_example_ynh 115 Dec 8 08:39 wsgi.py
-rw-r--r-- 1 django_example_ynh django_example_ynh 4737 Dec 8 08:39 django_example_ynh_demo_settings.py
root@yunohost:~# cd /home/yunohost.app/django_example_ynh/
root@yunohost:/home/yunohost.app/django_example_ynh# source venv/bin/activate
(venv) root@yunohost:/home/yunohost.app/django_example_ynh# ./manage.py check
django_example_ynh v0.8.2 (Django v2.2.17)
DJANGO_SETTINGS_MODULE='django_example_ynh_demo_settings'
PROJECT_PATH:/home/yunohost.app/django_example_ynh/venv/lib/python3.7/site-packages
BASE_PATH:/home/yunohost.app/django_example_ynh
root@yunohost:~# /home/yunohost.app/django_example/manage.py diffsettings
...
root@yunohost:~# /home/yunohost.app/django_example/manage.py check
ENV_TYPE:None
PROJECT_PATH:/home/yunohost.app/django_example/venv/lib/python3.9/site-packages
BASE_PATH:/root/django_example
System check identified no issues (0 silenced).
root@yunohost:~# tail -f /var/log/django_example_ynh/django_example_ynh.log
root@yunohost:~# cat /etc/systemd/system/systemd.service
root@yunohost:~# cat /etc/systemd/system/django_example.service
...
root@yunohost:~# systemctl reload-or-restart django_example_ynh
root@yunohost:~# journalctl --unit=django_example_ynh --follow
root@yunohost:~# systemctl reload-or-restart django_example
root@yunohost:~# journalctl --unit=django_example --follow
...
root@yunohost:~# tail -f /var/log/django_example/django_example.log
...
root@yunohost:~# tail -f /var/log/nginx/*.log
...
root@yunohost:~# ls -la /etc/nginx/conf.d/
root@yunohost:~# cat /etc/nginx/conf.d/$domain.d/django_example.conf
```
@ -210,4 +224,4 @@ ou
sudo yunohost app upgrade django_example -u https://github.com/YunoHost-Apps/django_example_ynh/tree/testing --debug
```
**Plus dinfos sur le packaging dapplications :** <https://yunohost.org/packaging_apps>
**Plus dinfos sur le packaging dapplications :** <https://yunohost.org/packaging_apps>