diff --git a/.gitignore b/.gitignore index 765f25eaa454407cf383acae6937464dbc266758..d7480c77dda62c22d0f3afebb7bd50f4301eebad 100755 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ __pycache__ env/ *.pyc -secure* \ No newline at end of file +secure* +.idea/workspace.xml diff --git a/.idea/workspace.xml b/.idea/workspace.xml index f1daf891b46949b0e2474e906357323e625f46f7..d8101d55a1d4f968aa61549ce0bcab77472240c0 100755 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -677,6 +677,7 @@ <option name="project" value="LOCAL" /> <updated>1524911299889</updated> </task> +<<<<<<< HEAD <task id="LOCAL-00037" summary="LDAP"> <created>1526753564006</created> <option name="number" value="00037" /> @@ -697,6 +698,20 @@ <component name="ToolWindowManager"> <frame x="0" y="25" width="1920" height="990" extended-state="6" /> <editor active="true" /> +======= + <task id="LOCAL-00037" summary="Add a quicklaunch with shortcodes for timetable | Add a page for substitutions (without code)"> + <created>1526737919793</created> + <option name="number" value="00037" /> + <option name="presentableId" value="LOCAL-00037" /> + <option name="project" value="LOCAL" /> + <updated>1526737919793</updated> + </task> + <option name="localTasksCounter" value="38" /> + <servers /> + </component> + <component name="ToolWindowManager"> + <frame x="-3" y="33" width="1926" height="1041" extended-state="6" /> +>>>>>>> 9f58af809583b3544244fca85cb9307a83d48c5d <layout> <window_info anchor="bottom" id="TODO" order="6" /> <window_info anchor="bottom" id="Event Log" order="7" sideWeight="0.5010672" side_tool="true" visible="true" weight="0.2368728" /> @@ -733,6 +748,10 @@ <option name="myLimit" value="2678400000" /> </component> <component name="VcsManagerConfiguration"> +<<<<<<< HEAD +======= + <MESSAGE value="Add dashboard with last activities (look at README)" /> +>>>>>>> 9f58af809583b3544244fca85cb9307a83d48c5d <MESSAGE value="Add dashboard with last activities (look at README) [ADD UNVERSIONED FILES, MISTAKE]" /> <MESSAGE value="Add notifications to dashboard" /> <MESSAGE value="Change menu" /> @@ -756,9 +775,14 @@ <MESSAGE value="First notification with email in AUB" /> <MESSAGE value="Finish AUB notification" /> <MESSAGE value="Change infrastructure for server" /> +<<<<<<< HEAD <MESSAGE value="LDAP" /> <MESSAGE value="Trys to work with LDAP groups [NOT WORKING]" /> <option name="LAST_COMMIT_MESSAGE" value="Trys to work with LDAP groups [NOT WORKING]" /> +======= + <MESSAGE value="Add a quicklaunch with shortcodes for timetable | Add a page for substitutions (without code)" /> + <option name="LAST_COMMIT_MESSAGE" value="Add a quicklaunch with shortcodes for timetable | Add a page for substitutions (without code)" /> +>>>>>>> 9f58af809583b3544244fca85cb9307a83d48c5d <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="true" /> <option name="REARRANGE_BEFORE_PROJECT_COMMIT" value="true" /> </component> diff --git a/README.md b/README.md index 4a28f08bfb3b7b78d8543930d5d43d165333b265..c36d4799644a841dd15630b92568ba610e7cce5c 100755 --- a/README.md +++ b/README.md @@ -43,6 +43,25 @@ pip install django pip install django-auth-ldap ``` - `example_secure_settings.py` zu `secure_settings.py` kopieren und anpassen +### LDAP (info.katharineum.de) +#### Adresse vom Info aus: +localhost:389 + +#### BIND-Nutzer +DN: uid=readldap,ou=people,dc=skole,dc=skolelinux,dc=no +PW: grummelPASS1531 + +#### BASIS DN +dc=skole,dc=skolelinux,dc=no + +#### SSH-Tunnel herstellen +```sudo ssh -L 389:localhost:389 <user>@info.katharineum.de -N ``` + (<user> durch Nutzer ersetzen) + +#### Verbindung testen +1. Tunnel erstellen (siehe Befehl) +2. Apache Active Directory (AD) zum Testen öffnen (Download unter http://directory.apache.org/studio/) +3. Verbindung in AD mit oben genannten Daten herstellen diff --git a/schoolapps/aub/migrations/0001_initial.py b/schoolapps/aub/migrations/0001_initial.py old mode 100755 new mode 100644 index 56fefdebea0d993ac89e7a7976cf5ca39419a965..37f42c634938bd4a2d0ff0ff5cf294fea07c8fd4 --- a/schoolapps/aub/migrations/0001_initial.py +++ b/schoolapps/aub/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 2.0.4 on 2018-04-10 11:02 +# Generated by Django 2.0.6 on 2018-06-10 10:12 from django.conf import settings from django.db import migrations, models @@ -22,10 +22,10 @@ class Migration(migrations.Migration): ('to_dt', models.DateTimeField(default=django.utils.timezone.now)), ('description', models.TextField()), ('created_at', models.DateTimeField(default=django.utils.timezone.now)), - ('created_by', models.ForeignKey(default=1, on_delete=models.SET(1), related_name='aubs', to=settings.AUTH_USER_MODEL)), + ('created_by', models.ForeignKey(default=3, on_delete=models.SET(3), related_name='aubs', to=settings.AUTH_USER_MODEL)), ], options={ - 'permissions': (('apply_for_aub', 'Apply for a AUB'), ('allow_aub', 'Allow a AUB'), ('check_aub', 'Check a AUB')), + 'permissions': (('apply_for_aub', 'Apply for a AUB'), ('cancel_aub', 'Cancel a AUB'), ('allow1_aub', 'First permission'), ('allow2_aub', 'Second permission'), ('check1_aub', 'Check a AUB'), ('check2_aub', 'Check a AUB')), }, ), migrations.CreateModel( diff --git a/schoolapps/aub/migrations/0002_aub_status.py b/schoolapps/aub/migrations/0002_aub_status.py old mode 100755 new mode 100644 index 6f73d4e1dba2c2fe3574fe5b4b2431fbdfac5ac4..ca79d2fb08724d95bfec02b6697b2496b9503e8d --- a/schoolapps/aub/migrations/0002_aub_status.py +++ b/schoolapps/aub/migrations/0002_aub_status.py @@ -1,4 +1,4 @@ -# Generated by Django 2.0.4 on 2018-04-10 11:03 +# Generated by Django 2.0.6 on 2018-06-10 10:17 from django.db import migrations, models diff --git a/schoolapps/aub/migrations/0003_auto_20180410_2343.py b/schoolapps/aub/migrations/0003_auto_20180410_2343.py deleted file mode 100755 index 152fc162a92953eee158a13eb2453c16758d63c8..0000000000000000000000000000000000000000 --- a/schoolapps/aub/migrations/0003_auto_20180410_2343.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 2.0.4 on 2018-04-10 21:43 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('aub', '0002_aub_status'), - ] - - operations = [ - migrations.AlterModelOptions( - name='aub', - options={'permissions': (('apply_for_aub', 'Apply for a AUB'), ('cancel_aub', 'Cancel a AUB'), ('allow1_aub', 'First permission'), ('allow2_aub', 'Second permission'), ('check_aub', 'Check a AUB'))}, - ), - ] diff --git a/schoolapps/aub/migrations/0004_auto_20180411_0007.py b/schoolapps/aub/migrations/0004_auto_20180411_0007.py deleted file mode 100755 index f2c8eb6aca3ccd5bf1a38951d0db11875812706f..0000000000000000000000000000000000000000 --- a/schoolapps/aub/migrations/0004_auto_20180411_0007.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 2.0.4 on 2018-04-10 22:07 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('aub', '0003_auto_20180410_2343'), - ] - - operations = [ - migrations.AlterModelOptions( - name='aub', - options={'permissions': (('apply_for_aub', 'Apply for a AUB'), ('cancel_aub', 'Cancel a AUB'), ('allow1_aub', 'First permission'), ('allow2_aub', 'Second permission'), ('check1_aub', 'Check a AUB'), ('check2_aub', 'Check a AUB'))}, - ), - ] diff --git a/schoolapps/aub/migrations/0005_auto_20180412_1109.py b/schoolapps/aub/migrations/0005_auto_20180412_1109.py deleted file mode 100755 index beaec156bbb482a6226a669dc44b986b58b93b5c..0000000000000000000000000000000000000000 --- a/schoolapps/aub/migrations/0005_auto_20180412_1109.py +++ /dev/null @@ -1,24 +0,0 @@ -# Generated by Django 2.0.3 on 2018-04-12 09:09 - -from django.conf import settings -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('aub', '0004_auto_20180411_0007'), - ] - - operations = [ - migrations.AlterField( - model_name='aub', - name='created_by', - field=models.ForeignKey(default=3, on_delete=models.SET(3), related_name='aubs', to=settings.AUTH_USER_MODEL), - ), - migrations.AlterField( - model_name='aub', - name='status', - field=models.ForeignKey(default=2, on_delete=models.SET(2), related_name='aubs', to='aub.Status'), - ), - ] diff --git a/schoolapps/aub/urls.py b/schoolapps/aub/urls.py index 6d17c2d0edc1c0d1353f57235770cd26136e1cab..cccfb2674ed8500b0cd101656f44890ab653f189 100755 --- a/schoolapps/aub/urls.py +++ b/schoolapps/aub/urls.py @@ -1,12 +1,12 @@ from django.urls import path -from .import views +#from .import views urlpatterns = [ - path('', views.index, name='aub_index'), - path('details/<int:aub_id>/', views.details, name='aub_details'), - path('apply_for', views.apply_for, name='aub_apply_for'), - path('applied_for', views.applied_for, name='aub_applied_for'), - path('check1', views.check1, name='aub_check1'), - path('check2', views.check2, name='aub_check2'), + #path('', views.index, name='aub_index'), + #path('details/<int:aub_id>/', views.details, name='aub_details'), + #path('apply_for', views.apply_for, name='aub_apply_for'), + #path('applied_for', views.applied_for, name='aub_applied_for'), + #path('check1', views.check1, name='aub_check1'), + #path('check2', views.check2, name='aub_check2'), ] diff --git a/schoolapps/schoolapps/settings.py b/schoolapps/schoolapps/settings.py index a8ad4d967feb1162df48e79fbc08a1badc6ebe90..51ccce9a00d7642512df7eb0b0c9d0b4af9cf902 100755 --- a/schoolapps/schoolapps/settings.py +++ b/schoolapps/schoolapps/settings.py @@ -27,9 +27,12 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Provided by secure_settings # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True +DEBUG = False -ALLOWED_HOSTS = [] +ALLOWED_HOSTS = [ + 'info.katharineum.de', + '178.63.239.184', +] # Application definition @@ -61,7 +64,9 @@ ROOT_URLCONF = 'schoolapps.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': ['./templates', '/srv/sites/school-apps/schoolapps/templates'], + 'DIRS': [ + os.path.join(BASE_DIR, 'templates') + ], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [