diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..13d74f4 Binary files /dev/null and b/.DS_Store differ diff --git a/app/.DS_Store b/app/.DS_Store new file mode 100644 index 0000000..933d2de Binary files /dev/null and b/app/.DS_Store differ diff --git a/app/static/.DS_Store b/app/static/.DS_Store new file mode 100644 index 0000000..ab4560d Binary files /dev/null and b/app/static/.DS_Store differ diff --git a/app/static/app/.DS_Store b/app/static/app/.DS_Store index cd3a2cf..edd3e09 100644 Binary files a/app/static/app/.DS_Store and b/app/static/app/.DS_Store differ diff --git a/app/static/app/images/.DS_Store b/app/static/app/images/.DS_Store new file mode 100644 index 0000000..2ea81ba Binary files /dev/null and b/app/static/app/images/.DS_Store differ diff --git a/app/static/app/images/Firefly stoppuhr mit minzblatt an der Seite als minimalistische icon 91455.jpg b/app/static/app/images/Firefly stoppuhr mit minzblatt an der Seite als minimalistische icon 91455.jpg new file mode 100644 index 0000000..829929a Binary files /dev/null and b/app/static/app/images/Firefly stoppuhr mit minzblatt an der Seite als minimalistische icon 91455.jpg differ diff --git a/app/static/app/js/dbcontrol.js b/app/static/app/js/dbcontrol.js index e918bfa..e0b9280 100644 --- a/app/static/app/js/dbcontrol.js +++ b/app/static/app/js/dbcontrol.js @@ -248,6 +248,9 @@ function filterEntriesByMonthYear(month, year) { // Tabelle auf dem Dashboard mit Infos füllen function fillTableWithEntries(entries) { const tableBody = document.getElementById('entriesTableBody'); + + entries.sort((a, b) => new Date(a.date) - new Date(b.date)); + console.log(entries) // Zuerst den Inhalt der Tabelle löschen (falls schon Daten da sind) tableBody.innerHTML = ''; diff --git a/app/static/app/js/serviceworker.js b/app/static/app/js/serviceworker.js index 9975220..a1123e0 100644 --- a/app/static/app/js/serviceworker.js +++ b/app/static/app/js/serviceworker.js @@ -4,6 +4,7 @@ self.addEventListener("install", event => { this.skipWaiting(); const urlsToCache = [ + '/app/login/', '/app/home/', '/static/app/css/bootstrap.css', '/static/app/css/custom.css', diff --git a/app/urls.py b/app/urls.py index 5dc70a7..e362efd 100644 --- a/app/urls.py +++ b/app/urls.py @@ -1,9 +1,11 @@ from django.urls import path from django.views.generic import TemplateView +from django.shortcuts import redirect from . import views urlpatterns = [ - path("", views.login), # NORMAL login - NUR FÜR DEV TIME + # path("", views.home), # NORMAL login - NUR FÜR DEV TIME + path("", lambda request: redirect("home/", permanent=True)), # NORMAL login - NUR FÜR DEV TIME path("login", views.login), path("home/", views.home), path('offline/', TemplateView.as_view(template_name="offline.html")), diff --git a/piomint/pwa_settings.py b/piomint/pwa_settings.py index bd2d4d5..033ab44 100644 --- a/piomint/pwa_settings.py +++ b/piomint/pwa_settings.py @@ -9,7 +9,7 @@ PWA_APP_BACKGROUND_COLOR = '#9FEDD7' PWA_APP_DISPLAY = 'standalone' PWA_APP_SCOPE = '/' PWA_APP_ORIENTATION = 'portrait' -PWA_APP_START_URL = '/app/' +PWA_APP_START_URL = '/app/home/' PWA_APP_STATUS_BAR_COLOR = 'black-translucent' PWA_SERVICE_WORKER_PATH = os.path.join(BASE_DIR, 'app/static/app/js', 'serviceworker.js') PWA_APP_ICONS = [ diff --git a/piomint/settings.py b/piomint/settings.py index dd384f4..209f3ef 100644 --- a/piomint/settings.py +++ b/piomint/settings.py @@ -83,25 +83,25 @@ WSGI_APPLICATION = 'piomint.wsgi.application' # Database # https://docs.djangoproject.com/en/5.1/ref/settings/#databases -# STANDART DATENBANK -# DATABASES = { -# 'default': { -# 'ENGINE': 'django.db.backends.sqlite3', -# 'NAME': BASE_DIR / 'db.sqlite3', -# } -# } - +#STANDART DATENBANK DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.mysql', - 'NAME': 'piomint', - 'USER': 'piomint', - 'PASSWORD': 'qZX696%F@apY', - 'HOST': '192.168.10.215', - 'PORT': '3306', + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': BASE_DIR / 'db.sqlite3', } } +# DATABASES = { +# 'default': { +# 'ENGINE': 'django.db.backends.mysql', +# 'NAME': 'piomint', +# 'USER': 'piomint', +# 'PASSWORD': 'qZX696%F@apY', +# 'HOST': '192.168.10.215', +# 'PORT': '3306', +# } +# } + # Password validation # https://docs.djangoproject.com/en/5.1/ref/settings/#auth-password-validators diff --git a/web/templates/web/index.html b/web/templates/web/index.html new file mode 100644 index 0000000..4955b87 --- /dev/null +++ b/web/templates/web/index.html @@ -0,0 +1,24 @@ + \ No newline at end of file diff --git a/web/views.py b/web/views.py index 0b3f67b..ed7fce0 100644 --- a/web/views.py +++ b/web/views.py @@ -2,11 +2,4 @@ from django.shortcuts import render, HttpResponse # Create your views here. def index(request): - return HttpResponse(''' -