From ed5fa52bb986c58b8e3143c2b6d1ff857564a8f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20K=C3=BCnsem=C3=B6ller?= <jkuensem@physik.uni-bielefeld.de> Date: Mon, 11 Jun 2018 09:06:16 +0000 Subject: [PATCH] Task LSMR-8: Added initial migration to allow adding triggers etc. in raw SQL --- SAS/LSMR/bin/lsmr | 1 + SAS/LSMR/src/CMakeLists.txt | 1 - SAS/LSMR/src/lsmr/settings.py | 10 +++++++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/SAS/LSMR/bin/lsmr b/SAS/LSMR/bin/lsmr index 570bb46a466..6ee38285d30 100644 --- a/SAS/LSMR/bin/lsmr +++ b/SAS/LSMR/bin/lsmr @@ -24,5 +24,6 @@ echo "---" echo "! This is for testing only, properly deploy in Nginx or Apache for production use!" echo "---" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +/usr/bin/python $DIR/../lib*/python3.4/site-packages/lofar/sas/lsmr/manage.py migrate /usr/bin/python $DIR/../lib*/python3.4/site-packages/lofar/sas/lsmr/manage.py runserver 0.0.0.0:8000 diff --git a/SAS/LSMR/src/CMakeLists.txt b/SAS/LSMR/src/CMakeLists.txt index 59947a0ce3f..b294cfc6e56 100644 --- a/SAS/LSMR/src/CMakeLists.txt +++ b/SAS/LSMR/src/CMakeLists.txt @@ -7,7 +7,6 @@ find_python_module(ldap REQUIRED) set(_py_files manage.py - urls.py ) python_install(${_py_files} diff --git a/SAS/LSMR/src/lsmr/settings.py b/SAS/LSMR/src/lsmr/settings.py index ea094208acb..9f7b5c2a176 100644 --- a/SAS/LSMR/src/lsmr/settings.py +++ b/SAS/LSMR/src/lsmr/settings.py @@ -31,6 +31,7 @@ ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ + 'lsmr.lsmrapp', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', @@ -76,12 +77,19 @@ WSGI_APPLICATION = 'lsmr.wsgi.application' DATABASES = { 'default': { + # SQLITE: 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + # Postgres: + #'ENGINE': 'django.db.backends.postgresql_psycopg2', + #'NAME': 'lsmr', + #'USER': 'lsmr', + #'PASSWORD': 'fixme', + #'HOST': 'localhost', + #'PORT': '', } } - # Password validation # https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators -- GitLab