diff --git a/README.md b/README.md index c5a7dc8..2ddeeb8 100644 --- a/README.md +++ b/README.md @@ -1,160 +1,43 @@ -# django_example_ynh + -Demo [YunoHost Application](https://install-app.yunohost.org/?app=django_example_ynh) to demonstrate the integration of a Django project under YunoHost. +# Django Example for YunoHost -[![Integration level](https://dash.yunohost.org/integration/django_example_ynh.svg)](https://dash.yunohost.org/appci/app/django_example_ynh) ![](https://ci-apps.yunohost.org/ci/badges/django_example_ynh.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/django_example_ynh.maintain.svg) -[![Install django_example_ynh with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=django_example_ynh) +[![Integration level](https://dash.yunohost.org/integration/django_example_ynh.svg)](https://dash.yunohost.org/appci/app/django_example_ynh) ![Working status](https://ci-apps.yunohost.org/ci/badges/django_example_ynh.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/django_example_ynh.maintain.svg) +[![Install Django Example with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=django_example_ynh) +*[Lire ce readme en français.](./README_fr.md)* -Pull requests welcome ;) +> *This package allows you to install Django Example quickly and simply on a YunoHost server. +If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* +## Overview -## local test +Demo YunoHost Application to demonstrate the integration of a Django project under YunoHost. -For quicker developing of django_example_ynh in the context of YunoHost app, -it's possible to run the Django developer server with the settings -and urls made for YunoHost installation. +**Shipped version:** v0.3.0~ynh1 -e.g.: -```bash -~$ git clone https://github.com/YunoHost-Apps/django_example_ynh.git -~$ cd django_example_ynh/ -~/django_example_ynh$ make -install-poetry install or update poetry -install install project via poetry -update update the sources and installation and generate "conf/requirements.txt" -lint Run code formatters and linter -fix-code-style Fix code formatting -tox-listenvs List all tox test environments -tox Run pytest via tox with all environments -pytest Run pytest -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 +## Documentation and resources -~/django_example_ynh$ make install-poetry -~/django_example_ynh$ make install -~/django_example_ynh$ make local-test -``` +* Official app website: +* Official user documentation: +* Official admin documentation: +* Upstream app code repository: +* YunoHost documentation for this app: +* Report a bug: -Notes: +## Developer info -* SQlite database will be used -* A super user with username `test` and password `test` is created -* The page is available under `http://127.0.0.1:8000/app_path/` +Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/django_example_ynh_ynh/tree/testing). +To try the testing branch, please proceed like that. -## history - -* [compare v0.1.5...master](https://github.com/YunoHost-Apps/django_example_ynh/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) - * 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) - * 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) - * 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) - * Bugfixes -* [v0.1.1 - 29.12.2020](https://github.com/YunoHost-Apps/django_example_ynh/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) - * first working state -* [23.12.2020](https://github.com/YunoHost-Apps/django_example_ynh/commit/f578f144a3a6d11d7044597c37d550d29c247773) - * init the project - - -## Links - -* Report a bug about this package: https://github.com/YunoHost-Apps/django_example_ynh -* 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-for-runners_ynh - ---- - -# Developer info - -## package installation / debugging - -Please send your pull request to https://github.com/YunoHost-Apps/django_example_ynh - -Try 'main' branch, e.g.: -```bash -sudo yunohost app install https://github.com/YunoHost-Apps/django_example_ynh/tree/master --debug +``` bash +sudo yunohost app install https://github.com/YunoHost-Apps/django_example_ynh_ynh/tree/testing --debug or -sudo yunohost app upgrade django_example_ynh -u https://github.com/YunoHost-Apps/django_example_ynh/tree/master --debug +sudo yunohost app upgrade django_example_ynh -u https://github.com/YunoHost-Apps/django_example_ynh_ynh/tree/testing --debug ``` -Try 'testing' branch, e.g.: -```bash -sudo yunohost app install https://github.com/YunoHost-Apps/django_example_ynh/tree/testing --debug -or -sudo yunohost app upgrade django_example_ynh -u https://github.com/YunoHost-Apps/django_example_ynh/tree/testing --debug -``` - -To remove call e.g.: -```bash -sudo yunohost app remove django_example_ynh -``` - -Backup / remove / restore cycle, e.g.: -```bash -yunohost backup create --apps django_example_ynh -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 -``` - -Debug installation, e.g.: -```bash -root@yunohost:~# ls -la /var/www/django_example_ynh/ -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 /opt/yunohost/django_example_ynh/ -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 .. --rw-r--r-- 1 django_example_ynh django_example_ynh 460 Dec 8 08:39 gunicorn.conf.py --rw-r--r-- 1 django_example_ynh django_example_ynh 0 Dec 8 08:39 local_settings.py --rwxr-xr-x 1 django_example_ynh django_example_ynh 274 Dec 8 08:39 manage.py --rw-r--r-- 1 django_example_ynh django_example_ynh 171 Dec 8 08:39 secret.txt -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 /opt/yunohost/django_example_ynh/ -root@yunohost:/opt/yunohost/django_example_ynh# source venv/bin/activate -(venv) root@yunohost:/opt/yunohost/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:/opt/yunohost/django_example_ynh/venv/lib/python3.7/site-packages -BASE_PATH:/opt/yunohost/django_example_ynh -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/django_example_ynh.service - -root@yunohost:~# systemctl reload-or-restart django_example_ynh -root@yunohost:~# journalctl --unit=django_example_ynh --follow -``` - - +**More info regarding app packaging:** diff --git a/README_fr.md b/README_fr.md new file mode 100644 index 0000000..d8bce11 --- /dev/null +++ b/README_fr.md @@ -0,0 +1,43 @@ + + +# Django Example pour YunoHost + +[![Niveau d'intégration](https://dash.yunohost.org/integration/django_example_ynh.svg)](https://dash.yunohost.org/appci/app/django_example_ynh) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/django_example_ynh.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/django_example_ynh.maintain.svg) +[![Installer Django Example avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=django_example_ynh) + +*[Read this readme in english.](./README.md)* + +> *Ce package vous permet d'installer Django Example 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.* + +## Vue d'ensemble + + + +**Version incluse :** v0.3.0~ynh1 + +## Documentations et ressources + +* Site officiel de l'app : +* Documentation officielle utilisateur : +* Documentation officielle de l'admin : +* Dépôt de code officiel de l'app : +* Documentation YunoHost pour cette app : +* Signaler un bug : + +## Informations pour les développeurs + +Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/django_example_ynh_ynh/tree/testing). + +Pour essayer la branche testing, procédez comme suit. + +``` bash +sudo yunohost app install https://github.com/YunoHost-Apps/django_example_ynh_ynh/tree/testing --debug +ou +sudo yunohost app upgrade django_example_ynh -u https://github.com/YunoHost-Apps/django_example_ynh_ynh/tree/testing --debug +``` + +**Plus d'infos sur le packaging d'applications :**