diff --git a/.gitignore b/.gitignore index 7370a390fab706f608d69125545dfd8ffbf13b76..765f25eaa454407cf383acae6937464dbc266758 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ __pycache__ env/ *.pyc +secure* \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 31101080f3c4d3496955be8bed4bdd3f89ce431f..12b15d02cac4e617b92b132018c765a9940bab48 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,8 +2,10 @@ <project version="4"> <component name="ChangeListManager"> <list default="true" id="3a000256-1023-4a19-a046-bde25cb853cc" name="Default" comment=""> + <change beforePath="" afterPath="$PROJECT_DIR$/schoolapps/schoolapps/example_secure_settings.py" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" /> - <change beforePath="$PROJECT_DIR$/schoolapps/aub/views.py" afterPath="$PROJECT_DIR$/schoolapps/aub/views.py" /> + <change beforePath="$PROJECT_DIR$/README.md" afterPath="$PROJECT_DIR$/README.md" /> + <change beforePath="$PROJECT_DIR$/schoolapps/schoolapps/settings.py" afterPath="$PROJECT_DIR$/schoolapps/schoolapps/settings.py" /> </list> <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> <option name="TRACKING_ENABLED" value="true" /> @@ -20,64 +22,69 @@ </component> <component name="FileEditorManager"> <leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> - <file leaf-file-name="urls.py" pinned="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/schoolapps/aub/urls.py"> + <file leaf-file-name="views.py" pinned="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/schoolapps/aub/views.py"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="102"> - <caret line="7" column="61" lean-forward="false" selection-start-line="7" selection-start-column="61" selection-end-line="7" selection-end-column="61" /> - <folding /> + <state relative-caret-position="239"> + <caret line="122" column="29" lean-forward="false" selection-start-line="122" selection-start-column="29" selection-end-line="122" selection-end-column="29" /> + <folding> + <element signature="e#0#78#0" expanded="true" /> + </folding> </state> </provider> </entry> </file> - <file leaf-file-name="urls.py" pinned="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/schoolapps/dashboard/urls.py"> + <file leaf-file-name=".gitignore" pinned="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/.gitignore"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="85"> - <caret line="6" column="31" lean-forward="false" selection-start-line="6" selection-start-column="31" selection-end-line="6" selection-end-column="31" /> + <state relative-caret-position="34"> + <caret line="2" column="5" lean-forward="true" selection-start-line="2" selection-start-column="5" selection-end-line="2" selection-end-column="5" /> <folding /> </state> </provider> </entry> </file> - <file leaf-file-name="views.py" pinned="false" current-in-tab="true"> - <entry file="file://$PROJECT_DIR$/schoolapps/aub/views.py"> + <file leaf-file-name="secure_settings.py" pinned="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/schoolapps/schoolapps/secure_settings.py"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="-494"> - <caret line="81" column="20" lean-forward="true" selection-start-line="81" selection-start-column="20" selection-end-line="81" selection-end-column="20" /> - <folding> - <element signature="e#0#78#0" expanded="true" /> - </folding> + <state relative-caret-position="204"> + <caret line="12" column="22" lean-forward="false" selection-start-line="12" selection-start-column="22" selection-end-line="12" selection-end-column="22" /> + <folding /> </state> </provider> </entry> </file> - <file leaf-file-name="models.py" pinned="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/schoolapps/aub/models.py"> + <file leaf-file-name="settings.py" pinned="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/schoolapps/schoolapps/settings.py"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="153"> - <caret line="11" column="4" lean-forward="false" selection-start-line="11" selection-start-column="4" selection-end-line="11" selection-end-column="4" /> - <folding /> + <state relative-caret-position="2388"> + <caret line="145" column="11" lean-forward="true" selection-start-line="145" selection-start-column="11" selection-end-line="145" selection-end-column="11" /> + <folding> + <element signature="e#309#318#0" expanded="true" /> + </folding> </state> </provider> </entry> </file> - <file leaf-file-name="models.py" pinned="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/schoolapps/dashboard/models.py"> + <file leaf-file-name="example_secure_settings.py" pinned="false" current-in-tab="true"> + <entry file="file://$PROJECT_DIR$/schoolapps/schoolapps/example_secure_settings.py"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="68"> - <caret line="4" column="5" lean-forward="false" selection-start-line="4" selection-start-column="5" selection-end-line="4" selection-end-column="5" /> + <state relative-caret-position="178"> + <caret line="20" column="35" lean-forward="true" selection-start-line="20" selection-start-column="35" selection-end-line="20" selection-end-column="35" /> <folding /> </state> </provider> </entry> </file> - <file leaf-file-name="index.html" pinned="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/schoolapps/dashboard/templates/dashboard/index.html"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="748"> - <caret line="44" column="32" lean-forward="false" selection-start-line="44" selection-start-column="32" selection-end-line="44" selection-end-column="32" /> - <folding /> + <file leaf-file-name="README.md" pinned="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/README.md"> + <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]"> + <state split_layout="SPLIT"> + <first_editor relative-caret-position="212"> + <caret line="27" column="54" lean-forward="false" selection-start-line="27" selection-start-column="54" selection-end-line="27" selection-end-column="54" /> + <folding /> + </first_editor> + <second_editor /> </state> </provider> </entry> @@ -129,8 +136,8 @@ <component name="FileTemplateManagerImpl"> <option name="RECENT_TEMPLATES"> <list> - <option value="Python Script" /> <option value="HTML File" /> + <option value="Python Script" /> </list> </option> </component> @@ -159,8 +166,6 @@ <component name="IdeDocumentHistory"> <option name="CHANGED_PATHS"> <list> - <option value="$PROJECT_DIR$/schoolapps/aub/migrations/0001_initial.py" /> - <option value="$PROJECT_DIR$/schoolapps/static/style.css" /> <option value="$PROJECT_DIR$/schoolapps/templates/registration/logged_out.html" /> <option value="$PROJECT_DIR$/schoolapps/aub/apps.py" /> <option value="$PROJECT_DIR$/schoolapps/dashboard/apps.py" /> @@ -191,7 +196,6 @@ <option value="$PROJECT_DIR$/schoolapps/templates/partials/impress.html" /> <option value="$PROJECT_DIR$/schoolapps/timetable/models.py" /> <option value="$PROJECT_DIR$/test.py" /> - <option value="$PROJECT_DIR$/schoolapps/schoolapps/settings.py" /> <option value="$PROJECT_DIR$/schoolapps/timetable/parse.py" /> <option value="$PROJECT_DIR$/schoolapps/templates/partials/footer.html" /> <option value="$PROJECT_DIR$/schoolapps/schoolapps/urls.py" /> @@ -202,7 +206,6 @@ <option value="$PROJECT_DIR$/schoolapps/timetable/urls.py" /> <option value="$PROJECT_DIR$/schoolapps/aub/forms.py" /> <option value="$PROJECT_DIR$/schoolapps/dashboard/migrations/0003_notification_user.py" /> - <option value="$PROJECT_DIR$/README.md" /> <option value="$PROJECT_DIR$/schoolapps/dashboard/urls.py" /> <option value="$PROJECT_DIR$/schoolapps/dashboard/views.py" /> <option value="$PROJECT_DIR$/schoolapps/dashboard/templates/dashboard/index.html" /> @@ -210,6 +213,10 @@ <option value="$PROJECT_DIR$/schoolapps/dashboard/models.py" /> <option value="$PROJECT_DIR$/schoolapps/templates/mail/notification.html" /> <option value="$PROJECT_DIR$/schoolapps/aub/views.py" /> + <option value="$PROJECT_DIR$/.gitignore" /> + <option value="$PROJECT_DIR$/schoolapps/schoolapps/secure_settings.py" /> + <option value="$PROJECT_DIR$/schoolapps/schoolapps/settings.py" /> + <option value="$PROJECT_DIR$/README.md" /> </list> </option> </component> @@ -241,7 +248,6 @@ <foldersAlwaysOnTop value="true" /> </navigator> <panes> - <pane id="Scratches" /> <pane id="ProjectPane"> <subPane> <expand> @@ -260,6 +266,12 @@ <item name="schoolapps" type="462c0819:PsiDirectoryNode" /> <item name="dashboard" type="462c0819:PsiDirectoryNode" /> </path> + <path> + <item name="school-apps" type="b2602c69:ProjectViewProjectNode" /> + <item name="school-apps" type="462c0819:PsiDirectoryNode" /> + <item name="schoolapps" type="462c0819:PsiDirectoryNode" /> + <item name="schoolapps" type="462c0819:PsiDirectoryNode" /> + </path> <path> <item name="school-apps" type="b2602c69:ProjectViewProjectNode" /> <item name="school-apps" type="462c0819:PsiDirectoryNode" /> @@ -298,6 +310,7 @@ </subPane> </pane> <pane id="Scope" /> + <pane id="Scratches" /> </panes> </component> <component name="PropertiesComponent"> @@ -307,6 +320,13 @@ <property name="DefaultHtmlFileTemplate" value="HTML File" /> </component> <component name="RecentsManager"> + <key name="CopyFile.RECENT_KEYS"> + <recent name="$PROJECT_DIR$/schoolapps/schoolapps" /> + <recent name="$PROJECT_DIR$/schoolapps/templates/mail" /> + <recent name="$PROJECT_DIR$" /> + <recent name="$PROJECT_DIR$/schoolapps/aub/templates/aub" /> + <recent name="$PROJECT_DIR$/schoolapps/static/common" /> + </key> <key name="MoveFile.RECENT_KEYS"> <recent name="$PROJECT_DIR$/schoolapps/timetable/templates/timetable" /> <recent name="$PROJECT_DIR$/schoolapps/timetable" /> @@ -314,12 +334,6 @@ <recent name="$PROJECT_DIR$/schoolapps/untisconnect" /> <recent name="$PROJECT_DIR$/schoolapps/dashboard/templates/dashboard" /> </key> - <key name="CopyFile.RECENT_KEYS"> - <recent name="$PROJECT_DIR$/schoolapps/templates/mail" /> - <recent name="$PROJECT_DIR$" /> - <recent name="$PROJECT_DIR$/schoolapps/aub/templates/aub" /> - <recent name="$PROJECT_DIR$/schoolapps/static/common" /> - </key> </component> <component name="RunDashboard"> <option name="ruleStates"> @@ -640,20 +654,27 @@ <option name="project" value="LOCAL" /> <updated>1523710638115</updated> </task> - <option name="localTasksCounter" value="35" /> + <task id="LOCAL-00035" summary="Finish AUB notification"> + <created>1523783419731</created> + <option name="number" value="00035" /> + <option name="presentableId" value="LOCAL-00035" /> + <option name="project" value="LOCAL" /> + <updated>1523783419731</updated> + </task> + <option name="localTasksCounter" value="36" /> <servers /> </component> <component name="ToolWindowManager"> - <frame x="-3" y="33" width="1372" height="729" extended-state="6" /> + <frame x="-3" y="33" width="1372" height="738" extended-state="6" /> <editor active="true" /> <layout> <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" /> <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.27083334" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" /> <window_info id="Python Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3294509" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" /> - <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.21963394" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> + <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.23770492" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" /> - <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.24621212" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> + <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> <window_info id="Docker" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="11" side_tool="false" content_ui="tabs" /> <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="SciView" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> @@ -680,7 +701,6 @@ <option name="myLimit" value="2678400000" /> </component> <component name="VcsManagerConfiguration"> - <MESSAGE value="Finish first design" /> <MESSAGE value="Finish basic design (header, footer, etc.)" /> <MESSAGE value="Translate login/logout | Comment header" /> <MESSAGE value="Add dashboard with last activities (look at README)" /> @@ -705,7 +725,8 @@ <MESSAGE value="One template for both check sites [AUB]" /> <MESSAGE value="Remove activity registering [DASHBOARD]" /> <MESSAGE value="First notification with email in AUB" /> - <option name="LAST_COMMIT_MESSAGE" value="First notification with email in AUB" /> + <MESSAGE value="Finish AUB notification" /> + <option name="LAST_COMMIT_MESSAGE" value="Finish AUB notification" /> <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="true" /> <option name="REARRANGE_BEFORE_PROJECT_COMMIT" value="true" /> </component> @@ -716,9 +737,6 @@ <watches-manager /> </component> <component name="editorHistoryManager"> - <entry file="file://$PROJECT_DIR$/schoolapps/aub/migrations/0002_remove_aub_x.py" /> - <entry file="file://$PROJECT_DIR$/schoolapps/aub/migrations/0004_auto_20171222_1722.py" /> - <entry file="file://$PROJECT_DIR$/schoolapps/aub/migrations/0010_auto_20180101_1622.py" /> <entry file="file://$PROJECT_DIR$/schoolapps/aub/migrations/0009_aub_status.py" /> <entry file="file://$PROJECT_DIR$/schoolapps/aub/admin.py"> <provider selected="true" editor-type-id="text-editor"> @@ -859,13 +877,6 @@ </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/schoolapps/schoolapps/settings.py"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="383"> - <caret line="147" column="19" lean-forward="false" selection-start-line="147" selection-start-column="19" selection-end-line="147" selection-end-column="19" /> - </state> - </provider> - </entry> <entry file="file://$PROJECT_DIR$/schoolapps/timetable/templates/timetable/plan.html"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="17"> @@ -941,16 +952,6 @@ </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/README.md"> - <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]"> - <state split_layout="SPLIT"> - <first_editor relative-caret-position="204"> - <caret line="12" column="7" lean-forward="true" selection-start-line="12" selection-start-column="7" selection-end-line="12" selection-end-column="7" /> - </first_editor> - <second_editor /> - </state> - </provider> - </entry> <entry file="file://$PROJECT_DIR$/schoolapps/templates/mail/email.html"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="0"> @@ -1041,13 +1042,58 @@ </entry> <entry file="file://$PROJECT_DIR$/schoolapps/aub/views.py"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="-494"> - <caret line="81" column="20" lean-forward="true" selection-start-line="81" selection-start-column="20" selection-end-line="81" selection-end-column="20" /> + <state relative-caret-position="239"> + <caret line="122" column="29" lean-forward="false" selection-start-line="122" selection-start-column="29" selection-end-line="122" selection-end-column="29" /> <folding> <element signature="e#0#78#0" expanded="true" /> </folding> </state> </provider> </entry> + <entry file="file://$PROJECT_DIR$/.gitignore"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="34"> + <caret line="2" column="5" lean-forward="true" selection-start-line="2" selection-start-column="5" selection-end-line="2" selection-end-column="5" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/schoolapps/schoolapps/secure_settings.py"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="204"> + <caret line="12" column="22" lean-forward="false" selection-start-line="12" selection-start-column="22" selection-end-line="12" selection-end-column="22" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/schoolapps/schoolapps/settings.py"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="2388"> + <caret line="145" column="11" lean-forward="true" selection-start-line="145" selection-start-column="11" selection-end-line="145" selection-end-column="11" /> + <folding> + <element signature="e#309#318#0" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/README.md"> + <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]"> + <state split_layout="SPLIT"> + <first_editor relative-caret-position="212"> + <caret line="27" column="54" lean-forward="false" selection-start-line="27" selection-start-column="54" selection-end-line="27" selection-end-column="54" /> + <folding /> + </first_editor> + <second_editor /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/schoolapps/schoolapps/example_secure_settings.py"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="178"> + <caret line="20" column="35" lean-forward="true" selection-start-line="20" selection-start-column="35" selection-end-line="20" selection-end-column="35" /> + <folding /> + </state> + </provider> + </entry> </component> </project> \ No newline at end of file diff --git a/README.md b/README.md index 935700cfff1831b1abe4851d1a47412f52a0c58f..092383911ce05356a203cdb28aa52e4eff5a1420 100644 --- a/README.md +++ b/README.md @@ -17,18 +17,32 @@ keine ## Installation ### Grundsystem ``` -apt install python3 python3-pip python3-mysqldb git mysql-server -pip3 install django +apt install python3 python3-dev python3-pip git mariadb-server python3-venv ``` ### MySQL-Datenbank 1. Datenbank `schoolapps` (`utf8_general_ci`) anlegen 2. Benutzer `www-data` anlegen 3. Benutzer `www-data` alle Rechte auf `schoolapps` geben +4. Benutzer `untis-read` anlegen +5. Benutzer `untis-read` Leserechte auf UNTIS-DB geben ``` mysql -u root -p CREATE DATABASE schoolapps; ``` +### Django +- Zum Installationsordner wechseln +``` +python3 -m venv env +source env/bin/activate +pip install mysqlclient +pip install django +``` +- `example_secure_settings.py` zu `secure_settings.py` kopieren und anpassen + + + + diff --git a/schoolapps/schoolapps/example_secure_settings.py b/schoolapps/schoolapps/example_secure_settings.py new file mode 100644 index 0000000000000000000000000000000000000000..413ee94a2627a2c7360e73d8fdca9122ddaa424a --- /dev/null +++ b/schoolapps/schoolapps/example_secure_settings.py @@ -0,0 +1,28 @@ +# EMAIL +EMAIL_HOST = 'postoffice.katharineum.de' +EMAIL_PORT = 587 +EMAIL_HOST_USER = 'infoplan@katharineum.de' +EMAIL_HOST_PASSWORD = 'grummelPASS1531' + +# SECRET KEY +SECRET_KEY = '_89lg!56$d^sf$22cz1ja_f)x9z(nc*y-x*@j4!!vzmlgi*53u' + +# DATABASES +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.mysql', + 'NAME': 'schoolapps', + 'USER': 'www-data', + 'PASSWORD': 'grummelPASS1531', + 'HOST': '', + 'PORT': '' + }, + 'untis': { + 'ENGINE': 'django.db.backends.mysql', + 'NAME': 'untiskath', + 'USER': 'www-data', + 'PASSWORD': 'grummelPASS1531', + 'HOST': '', + 'PORT': '' + } +} diff --git a/schoolapps/schoolapps/settings.py b/schoolapps/schoolapps/settings.py index 48a42b96f652b78d48d56e445c6d69929d55d8bb..e8e70bdae32b72add6fbdd1dc53e9e5755f087b3 100644 --- a/schoolapps/schoolapps/settings.py +++ b/schoolapps/schoolapps/settings.py @@ -11,6 +11,7 @@ https://docs.djangoproject.com/en/2.0/ref/settings/ """ import os +from .secure_settings import * # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) @@ -19,7 +20,8 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = '_89lg!56$d^sf$22cz1ja_f)x9z(nc*y-x*@j4!!vzmlgi*53u' +# SECRET_KEY = '_89lg!56$d^sf$22cz1ja_f)x9z(nc*y-x*@j4!!vzmlgi*53u' +# Provided by secure_settings # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True @@ -56,7 +58,7 @@ ROOT_URLCONF = 'schoolapps.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': ['./templates', ], + 'DIRS': ['./templates', '/srv/sites/school-apps/schoolapps/templates'], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ @@ -73,25 +75,25 @@ WSGI_APPLICATION = 'schoolapps.wsgi.application' # Database # https://docs.djangoproject.com/en/2.0/ref/settings/#databases - -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.mysql', - 'NAME': 'schoolapps', - 'USER': 'www-data', - 'PASSWORD': 'grummelPASS1531', - 'HOST': '', - 'PORT': '' - }, - 'untis': { - 'ENGINE': 'django.db.backends.mysql', - 'NAME': 'untiskath', - 'USER': 'www-data', - 'PASSWORD': 'grummelPASS1531', - 'HOST': '', - 'PORT': '' - } -} +# Provided by secure_settings +# DATABASES = { +# 'default': { +# 'ENGINE': 'django.db.backends.mysql', +# 'NAME': 'schoolapps', +# 'USER': 'www-data', +# 'PASSWORD': 'grummelPASS1531', +# 'HOST': '', +# 'PORT': '' +# }, +# 'untis': { +# 'ENGINE': 'django.db.backends.mysql', +# 'NAME': 'untiskath', +# 'USER': 'www-data', +# 'PASSWORD': 'grummelPASS1531', +# 'HOST': '', +# 'PORT': '' +# } +# } # Password validation # https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators @@ -138,10 +140,7 @@ STATICFILES_DIRS = [ # EMAIL EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' -EMAIL_HOST = 'postoffice.katharineum.de' -EMAIL_PORT = 587 -EMAIL_HOST_USER = 'infoplan@katharineum.de' -EMAIL_HOST_PASSWORD = 'grummelPASS1531' +# Email settings provided by secure_settings EMAIL_USE_TLS = True # TIMETABLE