mirror of
https://github.com/YunoHost-Apps/django_example_ynh.git
synced 2024-09-03 18:26:21 +02:00
Stabilize database settings if "ynh_sanitize_dbid" change the "app name"
This commit is contained in:
parent
2e937f4a24
commit
aa542026d0
2 changed files with 4 additions and 2 deletions
|
@ -50,8 +50,8 @@ MANAGERS = ADMINS
|
|||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.postgresql',
|
||||
'NAME': '__APP__',
|
||||
'USER': '__APP__',
|
||||
'NAME': '__DB_NAME__',
|
||||
'USER': '__DB_USER__',
|
||||
'PASSWORD': '__DB_PWD__',
|
||||
'HOST': '127.0.0.1',
|
||||
'PORT': '5432', # Default Postgres Port
|
||||
|
|
|
@ -143,6 +143,8 @@ settings="$final_path/settings.py"
|
|||
cp "../conf/settings.py" "$settings"
|
||||
|
||||
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$settings"
|
||||
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$settings"
|
||||
ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$settings"
|
||||
ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$settings"
|
||||
ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="$settings"
|
||||
ynh_replace_string --match_string="__ADMINMAIL__" --replace_string="$admin_mail" --target_file="$settings"
|
||||
|
|
Loading…
Reference in a new issue