mirror of
https://github.com/YunoHost-Apps/pyinventory_ynh.git
synced 2024-09-03 20:16:09 +02:00
commit
e42c56a185
11 changed files with 19 additions and 60 deletions
23
README.md
23
README.md
|
@ -24,10 +24,6 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
||||||
|
|
||||||
[PyInventory](https://github.com/jedie/PyInventory) is a libre web-based management to catalog things including state and location etc. using [Python](https://www.python.org/)/[Django](https://www.djangoproject.com/).
|
[PyInventory](https://github.com/jedie/PyInventory) is a libre web-based management to catalog things including state and location etc. using [Python](https://www.python.org/)/[Django](https://www.djangoproject.com/).
|
||||||
|
|
||||||
[![Integration level](https://dash.yunohost.org/integration/pyinventory_ynh.svg)](https://dash.yunohost.org/appci/app/pyinventory_ynh) ![](https://ci-apps.yunohost.org/ci/badges/pyinventory_ynh.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/pyinventory_ynh.maintain.svg)
|
|
||||||
[![Install pyinventory_ynh with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=pyinventory_ynh)
|
|
||||||
|
|
||||||
|
|
||||||
Pull requests welcome ;)
|
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)
|
||||||
|
@ -44,27 +40,8 @@ More screenshots are here: jedie.github.io/tree/master/screenshots/PyInventory
|
||||||
![Screenshot of PyInventory](./doc/screenshots/pyinventory_v020_screenshot_1.png)
|
![Screenshot of PyInventory](./doc/screenshots/pyinventory_v020_screenshot_1.png)
|
||||||
![Screenshot of PyInventory](./doc/screenshots/pyinventory_v0110_screenshot_memo_1.png)
|
![Screenshot of PyInventory](./doc/screenshots/pyinventory_v0110_screenshot_memo_1.png)
|
||||||
|
|
||||||
## Disclaimers / important information
|
|
||||||
|
|
||||||
## Settings and upgrades
|
|
||||||
|
|
||||||
Almost everything related to PyInventory's configuration is handled in a `"../conf/settings.py"` file.
|
|
||||||
You can edit the file `/home/yunohost.app/django_example/local_settings.py` to enable or disable features.
|
|
||||||
|
|
||||||
Test sending emails, e.g.:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
ssh admin@yourdomain.tld
|
|
||||||
root@yunohost:~# /home/yunohost.app/pyinventory/manage.py sendtestemail --admins
|
|
||||||
```
|
|
||||||
|
|
||||||
How to debug a django YunoHost app, take a look into:
|
|
||||||
|
|
||||||
* https://github.com/YunoHost-Apps/django_example_ynh#developer-info
|
|
||||||
|
|
||||||
## Documentation and resources
|
## Documentation and resources
|
||||||
|
|
||||||
* Official app website: <https://github.com/YunoHost-Apps/pyinventory_ynh>
|
|
||||||
* Official user documentation: <https://github.com/jedie/PyInventory>
|
* Official user documentation: <https://github.com/jedie/PyInventory>
|
||||||
* Official admin documentation: <https://github.com/YunoHost-Apps/pyinventory_ynh>
|
* Official admin documentation: <https://github.com/YunoHost-Apps/pyinventory_ynh>
|
||||||
* Upstream app code repository: <https://github.com/YunoHost-Apps/pyinventory_ynh>
|
* Upstream app code repository: <https://github.com/YunoHost-Apps/pyinventory_ynh>
|
||||||
|
|
23
README_fr.md
23
README_fr.md
|
@ -24,10 +24,6 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
|
||||||
|
|
||||||
[PyInventory](https://github.com/jedie/PyInventory) is a libre web-based management to catalog things including state and location etc. using [Python](https://www.python.org/)/[Django](https://www.djangoproject.com/).
|
[PyInventory](https://github.com/jedie/PyInventory) is a libre web-based management to catalog things including state and location etc. using [Python](https://www.python.org/)/[Django](https://www.djangoproject.com/).
|
||||||
|
|
||||||
[![Integration level](https://dash.yunohost.org/integration/pyinventory_ynh.svg)](https://dash.yunohost.org/appci/app/pyinventory_ynh) ![](https://ci-apps.yunohost.org/ci/badges/pyinventory_ynh.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/pyinventory_ynh.maintain.svg)
|
|
||||||
[![Install pyinventory_ynh with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=pyinventory_ynh)
|
|
||||||
|
|
||||||
|
|
||||||
Pull requests welcome ;)
|
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)
|
||||||
|
@ -44,27 +40,8 @@ More screenshots are here: jedie.github.io/tree/master/screenshots/PyInventory
|
||||||
![Capture d’écran de PyInventory](./doc/screenshots/pyinventory_v020_screenshot_1.png)
|
![Capture d’écran de PyInventory](./doc/screenshots/pyinventory_v020_screenshot_1.png)
|
||||||
![Capture d’écran de PyInventory](./doc/screenshots/pyinventory_v0110_screenshot_memo_1.png)
|
![Capture d’écran de PyInventory](./doc/screenshots/pyinventory_v0110_screenshot_memo_1.png)
|
||||||
|
|
||||||
## Avertissements / informations importantes
|
|
||||||
|
|
||||||
## Settings and upgrades
|
|
||||||
|
|
||||||
Almost everything related to PyInventory's configuration is handled in a `"../conf/settings.py"` file.
|
|
||||||
You can edit the file `/home/yunohost.app/django_example/local_settings.py` to enable or disable features.
|
|
||||||
|
|
||||||
Test sending emails, e.g.:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
ssh admin@yourdomain.tld
|
|
||||||
root@yunohost:~# /home/yunohost.app/pyinventory/manage.py sendtestemail --admins
|
|
||||||
```
|
|
||||||
|
|
||||||
How to debug a django YunoHost app, take a look into:
|
|
||||||
|
|
||||||
* https://github.com/YunoHost-Apps/django_example_ynh#developer-info
|
|
||||||
|
|
||||||
## Documentations et ressources
|
## Documentations et ressources
|
||||||
|
|
||||||
* Site officiel de l’app : <https://github.com/YunoHost-Apps/pyinventory_ynh>
|
|
||||||
* Documentation officielle utilisateur : <https://github.com/jedie/PyInventory>
|
* Documentation officielle utilisateur : <https://github.com/jedie/PyInventory>
|
||||||
* Documentation officielle de l’admin : <https://github.com/YunoHost-Apps/pyinventory_ynh>
|
* Documentation officielle de l’admin : <https://github.com/YunoHost-Apps/pyinventory_ynh>
|
||||||
* Dépôt de code officiel de l’app : <https://github.com/YunoHost-Apps/pyinventory_ynh>
|
* Dépôt de code officiel de l’app : <https://github.com/YunoHost-Apps/pyinventory_ynh>
|
||||||
|
|
|
@ -40,7 +40,7 @@ YNH_CURRENT_HOST = '__YNH_CURRENT_HOST__' # YunoHost main domain from: /etc/yun
|
||||||
# config_panel.toml settings:
|
# config_panel.toml settings:
|
||||||
|
|
||||||
DEBUG_ENABLED = '__DEBUG_ENABLED__'
|
DEBUG_ENABLED = '__DEBUG_ENABLED__'
|
||||||
DEBUG = DEBUG_ENABLED == 'YES'
|
DEBUG = DEBUG_ENABLED == '1'
|
||||||
|
|
||||||
LOG_LEVEL = '__LOG_LEVEL__'
|
LOG_LEVEL = '__LOG_LEVEL__'
|
||||||
ADMIN_EMAIL = '__ADMIN_EMAIL__'
|
ADMIN_EMAIL = '__ADMIN_EMAIL__'
|
||||||
|
|
|
@ -6,10 +6,6 @@
|
||||||
|
|
||||||
[PyInventory](https://github.com/jedie/PyInventory) is a libre web-based management to catalog things including state and location etc. using [Python](https://www.python.org/)/[Django](https://www.djangoproject.com/).
|
[PyInventory](https://github.com/jedie/PyInventory) is a libre web-based management to catalog things including state and location etc. using [Python](https://www.python.org/)/[Django](https://www.djangoproject.com/).
|
||||||
|
|
||||||
[![Integration level](https://dash.yunohost.org/integration/pyinventory_ynh.svg)](https://dash.yunohost.org/appci/app/pyinventory_ynh) ![](https://ci-apps.yunohost.org/ci/badges/pyinventory_ynh.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/pyinventory_ynh.maintain.svg)
|
|
||||||
[![Install pyinventory_ynh with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=pyinventory_ynh)
|
|
||||||
|
|
||||||
|
|
||||||
Pull requests welcome ;)
|
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)
|
||||||
|
|
|
@ -13,12 +13,12 @@ maintainers = ["Jens Diemer"]
|
||||||
[upstream]
|
[upstream]
|
||||||
# https://yunohost.org/en/packaging_manifest#upstream-section
|
# https://yunohost.org/en/packaging_manifest#upstream-section
|
||||||
license = "GPL-3.0-or-later"
|
license = "GPL-3.0-or-later"
|
||||||
website = "https://github.com/YunoHost-Apps/pyinventory_ynh"
|
|
||||||
admindoc = "https://github.com/YunoHost-Apps/pyinventory_ynh"
|
admindoc = "https://github.com/YunoHost-Apps/pyinventory_ynh"
|
||||||
userdoc = "https://github.com/jedie/PyInventory"
|
userdoc = "https://github.com/jedie/PyInventory"
|
||||||
code = "https://github.com/YunoHost-Apps/pyinventory_ynh"
|
code = "https://github.com/YunoHost-Apps/pyinventory_ynh"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[integration]
|
[integration]
|
||||||
# https://yunohost.org/en/packaging_manifest#integration-section
|
# https://yunohost.org/en/packaging_manifest#integration-section
|
||||||
yunohost = ">=11"
|
yunohost = ">=11"
|
||||||
|
@ -31,7 +31,10 @@ ram.build = "50M" # **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ..
|
||||||
ram.runtime = "50M" # **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ...
|
ram.runtime = "50M" # **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ...
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[install]
|
[install]
|
||||||
|
# https://yunohost.org/en/packaging_manifest#install-questions
|
||||||
|
|
||||||
[install.domain]
|
[install.domain]
|
||||||
# this is a generic question - ask strings are automatically handled by Yunohost's core
|
# this is a generic question - ask strings are automatically handled by Yunohost's core
|
||||||
type = "domain"
|
type = "domain"
|
||||||
|
@ -61,11 +64,9 @@ ram.runtime = "50M" # **estimate** minimum ram requirement. e.g. 50M, 400M, 1G,
|
||||||
type = "email"
|
type = "email"
|
||||||
example = "admin@example.com"
|
example = "admin@example.com"
|
||||||
|
|
||||||
[install.debug_enabled] # __DEBUG_ENABLED__
|
[install.debug_enabled] # __DEBUG_ENABLED__ will be set to "0" or "1" string
|
||||||
ask.en = "Should be never enabled in production!"
|
ask.en = "Should be never enabled in production!"
|
||||||
type = "select"
|
type = "boolean"
|
||||||
choices = ["YES", "NO"]
|
|
||||||
default = "NO"
|
|
||||||
|
|
||||||
[install.log_level] # __LOG_LEVEL__
|
[install.log_level] # __LOG_LEVEL__
|
||||||
ask.en = "Logging level"
|
ask.en = "Logging level"
|
||||||
|
|
|
@ -336,7 +336,12 @@ def diffsettings():
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
app_path = destination / 'opt_yunohost'
|
app_path = destination / 'opt_yunohost'
|
||||||
verbose_check_call(sys.executable, app_path / 'manage.py', 'diffsettings', cwd=app_path)
|
verbose_check_call(
|
||||||
|
sys.executable,
|
||||||
|
app_path / 'manage.py',
|
||||||
|
'diffsettings',
|
||||||
|
cwd=app_path,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
cli.add_command(diffsettings)
|
cli.add_command(diffsettings)
|
||||||
|
|
|
@ -213,4 +213,7 @@ applied_migrations = [
|
||||||
"877e2ec", # 2023-08-17T20:54:24+02:00
|
"877e2ec", # 2023-08-17T20:54:24+02:00
|
||||||
"be3f649", # 2023-08-22T19:36:57+02:00
|
"be3f649", # 2023-08-22T19:36:57+02:00
|
||||||
"c1a9d97", # 2023-11-01T19:59:17+01:00
|
"c1a9d97", # 2023-11-01T19:59:17+01:00
|
||||||
|
"0a5d693", # 2023-11-25T15:06:21+01:00
|
||||||
|
"6b89813", # 2023-11-25T15:23:07+01:00
|
||||||
|
"4abd4c0", # 2023-11-25T15:59:31+01:00
|
||||||
]
|
]
|
||||||
|
|
|
@ -13,7 +13,7 @@ __YNH_CURRENT_HOST__=${ynh_current_host}
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# 'debug_enabled' -> '__DEBUG_ENABLED__' -> settings.DEBUG
|
# 'debug_enabled' -> '__DEBUG_ENABLED__' -> settings.DEBUG
|
||||||
debug_enabled="NO" # "YES" or "NO" string
|
debug_enabled="0" # "1" or "0" string
|
||||||
|
|
||||||
# 'log_level' -> '__LOG_LEVEL__' -> settings.LOG_LEVEL
|
# 'log_level' -> '__LOG_LEVEL__' -> settings.LOG_LEVEL
|
||||||
log_level="WARNING"
|
log_level="WARNING"
|
||||||
|
|
|
@ -26,7 +26,7 @@ def pytest_configure():
|
||||||
destination=BASE_PATH / 'local_test',
|
destination=BASE_PATH / 'local_test',
|
||||||
runserver=False,
|
runserver=False,
|
||||||
extra_replacements={
|
extra_replacements={
|
||||||
'__DEBUG_ENABLED__': 'NO', # "YES" or "NO" string
|
'__DEBUG_ENABLED__': '0', # "1" or "0" string
|
||||||
'__LOG_LEVEL__': 'INFO',
|
'__LOG_LEVEL__': 'INFO',
|
||||||
'__ADMIN_EMAIL__': 'foo-bar@test.tld',
|
'__ADMIN_EMAIL__': 'foo-bar@test.tld',
|
||||||
'__DEFAULT_FROM_EMAIL__': 'django_app@test.tld',
|
'__DEFAULT_FROM_EMAIL__': 'django_app@test.tld',
|
||||||
|
|
|
@ -36,7 +36,7 @@ class DjangoYnhTestCase(HtmlAssertionMixin, TestCase):
|
||||||
|
|
||||||
def test_config_panel_settings(self):
|
def test_config_panel_settings(self):
|
||||||
# config_panel.toml settings, set via tests.conftest.pytest_configure():
|
# config_panel.toml settings, set via tests.conftest.pytest_configure():
|
||||||
assert settings.DEBUG_ENABLED == 'NO' and settings.DEBUG is False
|
assert settings.DEBUG_ENABLED == '0' and settings.DEBUG is False
|
||||||
assert settings.LOG_LEVEL == 'INFO'
|
assert settings.LOG_LEVEL == 'INFO'
|
||||||
assert settings.ADMIN_EMAIL == 'foo-bar@test.tld'
|
assert settings.ADMIN_EMAIL == 'foo-bar@test.tld'
|
||||||
assert settings.DEFAULT_FROM_EMAIL == 'django_app@test.tld'
|
assert settings.DEFAULT_FROM_EMAIL == 'django_app@test.tld'
|
||||||
|
|
Loading…
Reference in a new issue