mirror of
https://github.com/YunoHost-Apps/django_example_ynh.git
synced 2024-09-03 18:26:21 +02:00
commit
bc6b7ab9a6
6 changed files with 15 additions and 8 deletions
|
@ -121,8 +121,11 @@ Notes:
|
||||||
|
|
||||||
## history
|
## history
|
||||||
|
|
||||||
* [compare v0.1.2...master](https://github.com/YunoHost-Apps/django_ynh/compare/v0.1.2...master) **dev**
|
* [compare v0.1.3...master](https://github.com/YunoHost-Apps/django_ynh/compare/v0.1.3...master) **dev**
|
||||||
* tbc
|
* tbc
|
||||||
|
* [v0.1.3 - 08.01.2021](https://github.com/YunoHost-Apps/django_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_ynh/compare/v0.1.1...v0.1.2)
|
* [v0.1.2 - 29.12.2020](https://github.com/YunoHost-Apps/django_ynh/compare/v0.1.1...v0.1.2)
|
||||||
* Bugfixes
|
* Bugfixes
|
||||||
* [v0.1.1 - 29.12.2020](https://github.com/YunoHost-Apps/django_ynh/compare/v0.1.0...v0.1.1)
|
* [v0.1.1 - 29.12.2020](https://github.com/YunoHost-Apps/django_ynh/compare/v0.1.0...v0.1.1)
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
__version__ = '0.1.2'
|
__version__ = '0.1.3'
|
||||||
|
|
|
@ -54,12 +54,15 @@ def copy_patch(src_file, replaces, final_home_path):
|
||||||
|
|
||||||
|
|
||||||
def create_local_test(django_settings_path, destination, runserver=False):
|
def create_local_test(django_settings_path, destination, runserver=False):
|
||||||
|
django_settings_path = django_settings_path.resolve()
|
||||||
assert_is_file(django_settings_path)
|
assert_is_file(django_settings_path)
|
||||||
|
|
||||||
django_settings_name = django_settings_path.stem
|
django_settings_name = django_settings_path.stem
|
||||||
|
|
||||||
conf_path = django_settings_path.parent
|
conf_path = django_settings_path.parent
|
||||||
|
|
||||||
|
project_name = conf_path.parent.name
|
||||||
|
|
||||||
assert isinstance(destination, Path)
|
assert isinstance(destination, Path)
|
||||||
destination = destination.resolve()
|
destination = destination.resolve()
|
||||||
if not destination.is_dir():
|
if not destination.is_dir():
|
||||||
|
@ -69,12 +72,12 @@ def create_local_test(django_settings_path, destination, runserver=False):
|
||||||
|
|
||||||
final_home_path = destination / 'opt_yunohost'
|
final_home_path = destination / 'opt_yunohost'
|
||||||
final_www_path = destination / 'var_www'
|
final_www_path = destination / 'var_www'
|
||||||
log_file = destination / 'var_log_django_ynh.log'
|
log_file = destination / f'var_log_{project_name}.log'
|
||||||
|
|
||||||
REPLACES = {
|
REPLACES = {
|
||||||
'__FINAL_HOME_PATH__': str(final_home_path),
|
'__FINAL_HOME_PATH__': str(final_home_path),
|
||||||
'__FINAL_WWW_PATH__': str(final_www_path),
|
'__FINAL_WWW_PATH__': str(final_www_path),
|
||||||
'__LOG_FILE__': str(destination / 'var_log_django_ynh.log'),
|
'__LOG_FILE__': str(log_file),
|
||||||
'__PATH_URL__': 'app_path',
|
'__PATH_URL__': 'app_path',
|
||||||
'__DOMAIN__': '127.0.0.1',
|
'__DOMAIN__': '127.0.0.1',
|
||||||
'django.db.backends.postgresql': 'django.db.backends.sqlite3',
|
'django.db.backends.postgresql': 'django.db.backends.sqlite3',
|
||||||
|
@ -98,7 +101,7 @@ def create_local_test(django_settings_path, destination, runserver=False):
|
||||||
with Path(final_home_path / 'local_settings.py').open('w') as f:
|
with Path(final_home_path / 'local_settings.py').open('w') as f:
|
||||||
f.write('# Only for local test run\n')
|
f.write('# Only for local test run\n')
|
||||||
f.write('DEBUG = True\n')
|
f.write('DEBUG = True\n')
|
||||||
f.write('SERVE_FILES = True # used in src/inventory_project/urls.py\n')
|
f.write('SERVE_FILES = True # May used in urls.py\n')
|
||||||
f.write('AUTH_PASSWORD_VALIDATORS = [] # accept all passwords\n')
|
f.write('AUTH_PASSWORD_VALIDATORS = [] # accept all passwords\n')
|
||||||
|
|
||||||
# call "local_test/manage.py" via subprocess:
|
# call "local_test/manage.py" via subprocess:
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
"description": {
|
"description": {
|
||||||
"en": "Glue code to package django projects as yunohost apps."
|
"en": "Glue code to package django projects as yunohost apps."
|
||||||
},
|
},
|
||||||
"version": "0.1.2~ynh1",
|
"version": "0.1.3~ynh1",
|
||||||
"url": "https://github.com/jedie/django_ynh",
|
"url": "https://github.com/jedie/django_ynh",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "django_ynh"
|
name = "django_ynh"
|
||||||
version = "0.1.2"
|
version = "0.1.3"
|
||||||
description = "Glue code to package django projects as yunohost apps."
|
description = "Glue code to package django projects as yunohost apps."
|
||||||
authors = ["JensDiemer <git@jensdiemer.de>"]
|
authors = ["JensDiemer <git@jensdiemer.de>"]
|
||||||
license = "GPL"
|
license = "GPL"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
homepage = "https://github.com/YunoHost-Apps/django_ynh"
|
||||||
packages = [
|
packages = [
|
||||||
{ include = "django_ynh" },
|
{ include = "django_ynh" },
|
||||||
]
|
]
|
||||||
|
|
|
@ -28,7 +28,7 @@ log_file="${log_path}/django_ynh.log"
|
||||||
pkg_dependencies="build-essential python3-dev python3-pip python3-venv git postgresql postgresql-contrib"
|
pkg_dependencies="build-essential python3-dev python3-pip python3-venv git postgresql postgresql-contrib"
|
||||||
|
|
||||||
# To install/upgrade this project via pip:
|
# To install/upgrade this project via pip:
|
||||||
pip_install_string="django_ynh==0.1.2"
|
pip_install_string="django_ynh==0.1.3"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# Redis HELPERS
|
# Redis HELPERS
|
||||||
|
|
Loading…
Add table
Reference in a new issue