Skip to main content

Glue code to package django projects as yunohost apps.

Project description

django_ynh

Current state is broken, because we are planing ;)

Integration level Install django_ynh with YunoHost

This package allows you to install django_ynh quickly and simply on a YunoHost server. If you don't have YunoHost, please consult the guide to learn how to install it.

Pull requests welcome ;)

Overview

Glue code to package django projects as yunohost apps.

SSO authentication

SSOwat is fully supported:

  • First user ($YNH_APP_ARG_ADMIN) will be created as Django's super user
  • All new users will be created as normal users
  • Login via SSO is fully supported
  • User Email, First / Last name will be updated from SSO data

Links


Developer info

package installation / debugging

Please send your pull request to https://github.com/YunoHost-Apps/django_ynh

Try 'main' branch, e.g.:

sudo yunohost app install https://github.com/YunoHost-Apps/django_ynh/tree/master --debug
or
sudo yunohost app upgrade django_ynh -u https://github.com/YunoHost-Apps/django_ynh/tree/master --debug

Try 'testing' branch, e.g.:

sudo yunohost app install https://github.com/YunoHost-Apps/django_ynh/tree/testing --debug
or
sudo yunohost app upgrade django_ynh -u https://github.com/YunoHost-Apps/django_ynh/tree/testing --debug

To remove call e.g.:

sudo yunohost app remove django_ynh

Backup / remove / restore cycle, e.g.:

yunohost backup create --apps django_ynh
yunohost backup list
archives:
  - django_ynh-pre-upgrade1
  - 20201223-163434
yunohost app remove django_ynh
yunohost backup restore 20201223-163434 --apps django_ynh

Debug installation, e.g.:

root@yunohost:~# ls -la /var/www/django_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_ynh/
total 58
drwxr-xr-x 5 django_ynh django_ynh   11 Dec  8 08:39 .
drwxr-xr-x 3 root        root           3 Dec  8 08:36 ..
-rw-r--r-- 1 django_ynh django_ynh  460 Dec  8 08:39 gunicorn.conf.py
-rw-r--r-- 1 django_ynh django_ynh    0 Dec  8 08:39 local_settings.py
-rwxr-xr-x 1 django_ynh django_ynh  274 Dec  8 08:39 manage.py
-rw-r--r-- 1 django_ynh django_ynh  171 Dec  8 08:39 secret.txt
drwxr-xr-x 6 django_ynh django_ynh    6 Dec  8 08:37 venv
-rw-r--r-- 1 django_ynh django_ynh  115 Dec  8 08:39 wsgi.py
-rw-r--r-- 1 django_ynh django_ynh 4737 Dec  8 08:39 django_ynh.settings.py

root@yunohost:~# cd /opt/yunohost/django_ynh/
root@yunohost:/opt/yunohost/django_ynh# source venv/bin/activate
(venv) root@yunohost:/opt/yunohost/django_ynh# ./manage.py check
django_ynh v0.8.2 (Django v2.2.17)
DJANGO_SETTINGS_MODULE='django_ynh.settings'
PROJECT_PATH:/opt/yunohost/django_ynh/venv/lib/python3.7/site-packages
BASE_PATH:/opt/yunohost/django_ynh
System check identified no issues (0 silenced).

root@yunohost:~# tail -f /var/log/django_ynh/django_ynh.log
root@yunohost:~# cat /etc/systemd/system/django_ynh.service

root@yunohost:~# systemctl reload-or-restart django_ynh
root@yunohost:~# journalctl --unit=django_ynh --follow

local test

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

e.g.:

~$ git clone https://github.com/YunoHost-Apps/django_ynh.git
~$ cd django_ynh/
~/django_ynh$ make
install-poetry         install or update poetry
install                install django_ynh via poetry
update                 update the sources and installation
local-test             Run local_test.py to run django_ynh locally
~/django_ynh$ make install-poetry
~/django_ynh$ make install
~/django_ynh$ make local-test

Notes:

  • 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/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_ynh-0.1.0a0.tar.gz (19.3 kB view details)

Uploaded Source

Built Distribution

django_ynh-0.1.0a0-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

File details

Details for the file django_ynh-0.1.0a0.tar.gz.

File metadata

  • Download URL: django_ynh-0.1.0a0.tar.gz
  • Upload date:
  • Size: 19.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.5

File hashes

Hashes for django_ynh-0.1.0a0.tar.gz
Algorithm Hash digest
SHA256 8bb504c89c47080dc16f142984f1618e552a6a57001f76373fff3ec30ed82701
MD5 e3b7db7113bb0ee94796b98b2e3028a1
BLAKE2b-256 ef7919f0de5388890e058660083d89a5b079a2ddcda4c8a0f512a0aad116a61a

See more details on using hashes here.

Provenance

File details

Details for the file django_ynh-0.1.0a0-py3-none-any.whl.

File metadata

  • Download URL: django_ynh-0.1.0a0-py3-none-any.whl
  • Upload date:
  • Size: 19.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.5

File hashes

Hashes for django_ynh-0.1.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 56aed0524b2a1cf9ba8864be5cd3de652cc67ef8420122010fc1f6e137231077
MD5 840d9090aaa0b205a514db9819d81152
BLAKE2b-256 0f9a112382757da7575d01930a71aae10efe6827e4900bb374e27cb925e58a56

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page