From a25b5f82989b0e1c4abbfe0feca7f836a608c7e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Tue, 19 Mar 2019 01:10:27 +0100 Subject: Caldance updates --- .../role/templates/caldance/local_settings.py.erb | 25 ++++++++++++++++++++++ modules/role/templates/caldance/manage.py.erb | 9 ++++++++ 2 files changed, 34 insertions(+) create mode 100644 modules/role/templates/caldance/local_settings.py.erb create mode 100644 modules/role/templates/caldance/manage.py.erb (limited to 'modules/role/templates/caldance') diff --git a/modules/role/templates/caldance/local_settings.py.erb b/modules/role/templates/caldance/local_settings.py.erb new file mode 100644 index 0000000..4da53f6 --- /dev/null +++ b/modules/role/templates/caldance/local_settings.py.erb @@ -0,0 +1,25 @@ +import os +DATABASES = { + 'default': { + 'ENGINE': 'django.contrib.gis.db.backends.postgis', + 'NAME': '<%= @pg_db %>', + 'USER': '<%= @pg_user %>', + 'PASSWORD': u'<%= @pg_password %>', + 'HOST': '<%= @pg_hostname %>', + 'PORT': '<%= @pg_port %>', + } +} + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = os.environ.get('SECRET_KEY', '<%= @secret_key %>') +DEBUG = False +SECURE_HSTS_PRELOAD = True # moved from local settings as local runserver don't do SSL +SECURE_HSTS_SECONDS = 1 +SECURE_SSL_REDIRECT = True +LOG_FILE = '<%= @home %>/caldev_django.log' + +DEFAULT_FROM_EMAIL = '<%= @mail_from %>' +EMAIL_USE_SSL = True +EMAIL_HOST = "<%= @smtp_host %>" +EMAIL_PORT = <%= @smtp_port %> + diff --git a/modules/role/templates/caldance/manage.py.erb b/modules/role/templates/caldance/manage.py.erb new file mode 100644 index 0000000..dc06eab --- /dev/null +++ b/modules/role/templates/caldance/manage.py.erb @@ -0,0 +1,9 @@ +#!<%= @python_path %> -O +import os +import sys + +if __name__ == "__main__": + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "main_app.settings") + + from django.core.management import execute_from_command_line + execute_from_command_line(sys.argv) -- cgit v1.2.3