rename settings and urls

This commit is contained in:
JensDiemer 2020-12-29 11:12:21 +01:00
parent d40e863abe
commit 05be4ad6b4
7 changed files with 6 additions and 12 deletions

View file

@ -5,7 +5,7 @@ import sys
def main(): def main():
os.environ['DJANGO_SETTINGS_MODULE'] = 'django_ynh_demo_settings' os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
from django.core.management import execute_from_command_line from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv) execute_from_command_line(sys.argv)

View file

@ -37,9 +37,6 @@ PATH_URL = PATH_URL.strip('/')
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
ROOT_URLCONF = 'django_ynh_demo_urls'
YNH_SETUP_USER = 'setup_user.setup_demo_user' YNH_SETUP_USER = 'setup_user.setup_demo_user'
SECRET_KEY = __get_or_create_secret(FINAL_HOME_PATH / 'secret.txt') # /opt/yunohost/$app/secret.txt SECRET_KEY = __get_or_create_secret(FINAL_HOME_PATH / 'secret.txt') # /opt/yunohost/$app/secret.txt

View file

@ -2,9 +2,7 @@
WSGI config WSGI config
""" """
import os import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
os.environ['DJANGO_SETTINGS_MODULE'] = 'django_ynh_demo_settings'
from django.core.wsgi import get_wsgi_application from django.core.wsgi import get_wsgi_application

View file

@ -7,11 +7,12 @@
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# settings that should be set in project settings: # settings that should be set in project settings:
ROOT_URLCONF = None
SECRET_KEY = None SECRET_KEY = None
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
ROOT_URLCONF = 'urls' # .../conf/urls.py
INSTALLED_APPS = [ INSTALLED_APPS = [
'django.contrib.admin', 'django.contrib.admin',
'django.contrib.auth', 'django.contrib.auth',

View file

@ -155,8 +155,7 @@ ynh_app_setting_set --app="$app" --key=redis_db --value="$redis_db"
touch "$final_path/local_settings.py" touch "$final_path/local_settings.py"
cp "../conf/ynh_authenticate.py" "$final_path/ynh_authenticate.py" cp "../conf/urls.py" "$final_path/urls.py"
cp "../conf/ynh_urls.py" "$final_path/ynh_urls.py"
#================================================= #=================================================
# MIGRATE / COLLECTSTATIC / CREATEADMIN # MIGRATE / COLLECTSTATIC / CREATEADMIN

View file

@ -143,8 +143,7 @@ ynh_store_file_checksum --file="$settings"
touch "$final_path/local_settings.py" touch "$final_path/local_settings.py"
cp "../conf/ynh_authenticate.py" "$final_path/ynh_authenticate.py" cp "../conf/urls.py" "$final_path/urls.py"
cp "../conf/ynh_urls.py" "$final_path/ynh_urls.py"
#================================================= #=================================================
# MIGRATE django_ynh # MIGRATE django_ynh