diff --git a/django_code/dashboard/__pycache__/apps.cpython-312.pyc b/django_code/dashboard/__pycache__/apps.cpython-312.pyc
new file mode 100644
index 0000000..261f917
Binary files /dev/null and b/django_code/dashboard/__pycache__/apps.cpython-312.pyc differ
diff --git a/django_code/dashboard/apps.py b/django_code/dashboard/apps.py
new file mode 100644
index 0000000..4e31abe
--- /dev/null
+++ b/django_code/dashboard/apps.py
@@ -0,0 +1,10 @@
+from django.apps import AppConfig
+from django.http import HttpResponse
+from django.shortcuts import render
+from django.shortcuts import redirect
+import time
+import random
+
+def hello(request):
+ return HttpResponse('
Hello dashboard h1>')
+
diff --git a/django_code/django_code/__pycache__/urls.cpython-312.pyc b/django_code/django_code/__pycache__/urls.cpython-312.pyc
index 73488e3..e53a372 100644
Binary files a/django_code/django_code/__pycache__/urls.cpython-312.pyc and b/django_code/django_code/__pycache__/urls.cpython-312.pyc differ
diff --git a/django_code/django_code/urls.py b/django_code/django_code/urls.py
index 203666e..5ee9bfc 100644
--- a/django_code/django_code/urls.py
+++ b/django_code/django_code/urls.py
@@ -18,16 +18,33 @@ from django.contrib import admin
from django.urls import path
#from docker_connection import views, apps
from random_simpsons import apps as random_simpsons
+from paperless_django import apps as paperless_django
+from onenote import apps as onenote
+from dashboard import apps as dashboard
urlpatterns = [
# path('admin/', admin.site.urls),
- path('hello/', random_simpsons.hello),
- # path('bookstack/', docker_connection.apps.hello),
- # path('test/', docker_connection.apps.http_call_test),
- # path('proxmox/', docker_connection.apps.proxmox),
-# path('simpsons/', random_simpsons.hello),
- path('simpsons/', random_simpsons.simpsons),
+################### Simpsons ###################
+ path('hello/', random_simpsons.hello),
+ path('simpsons/', random_simpsons.simpsons),
+ path('download_file/', random_simpsons.download_file),
+
+################### paperless ###################
+ path('paperless/hello/', paperless_django.hello),
+# path('simpsons/', random_simpsons.simpsons),
+
+################### onenote ###################
+ path('onenote/hello/', onenote.hello),
+
+################### onenote ###################
+ path('dashboard/hello/', dashboard.hello),
+
+
+# path('bookstack/', docker_connection.apps.hello),
+# path('test/', docker_connection.apps.http_call_test),
+# path('proxmox/', docker_connection.apps.proxmox),
+# path('simpsons/', random_simpsons.hello),
# path('docker//', docker_connection.apps.docker_call),
diff --git a/django_code/onenote/__pycache__/apps.cpython-312.pyc b/django_code/onenote/__pycache__/apps.cpython-312.pyc
new file mode 100644
index 0000000..c91f9a3
Binary files /dev/null and b/django_code/onenote/__pycache__/apps.cpython-312.pyc differ
diff --git a/django_code/onenote/apps.py b/django_code/onenote/apps.py
new file mode 100644
index 0000000..ef333eb
--- /dev/null
+++ b/django_code/onenote/apps.py
@@ -0,0 +1,10 @@
+from django.apps import AppConfig
+from django.http import HttpResponse
+from django.shortcuts import render
+from django.shortcuts import redirect
+import time
+import random
+
+def hello(request):
+ return HttpResponse('Hello onenote! ')
+
diff --git a/django_code/paperless_django/__pycache__/apps.cpython-312.pyc b/django_code/paperless_django/__pycache__/apps.cpython-312.pyc
new file mode 100644
index 0000000..350d9eb
Binary files /dev/null and b/django_code/paperless_django/__pycache__/apps.cpython-312.pyc differ
diff --git a/django_code/paperless_django/apps.py b/django_code/paperless_django/apps.py
new file mode 100644
index 0000000..2076f02
--- /dev/null
+++ b/django_code/paperless_django/apps.py
@@ -0,0 +1,16 @@
+from django.apps import AppConfig
+from django.http import HttpResponse
+from django.shortcuts import render
+from django.shortcuts import redirect
+import time
+import random
+
+def hello(request):
+ return HttpResponse('Hello paperless! ')
+
+def redirect_authenticated(request):
+
+ final_url = "https://paperless.tryton.geeraert.eu/"
+ print(final_url)
+
+ return redirect(str(final_url))
diff --git a/django_code/random_simpsons/__pycache__/apps.cpython-312.pyc b/django_code/random_simpsons/__pycache__/apps.cpython-312.pyc
index fb66066..f93589b 100644
Binary files a/django_code/random_simpsons/__pycache__/apps.cpython-312.pyc and b/django_code/random_simpsons/__pycache__/apps.cpython-312.pyc differ
diff --git a/django_code/random_simpsons/apps.py b/django_code/random_simpsons/apps.py
index 41c59f3..59c6272 100644
--- a/django_code/random_simpsons/apps.py
+++ b/django_code/random_simpsons/apps.py
@@ -2,14 +2,48 @@ from django.apps import AppConfig
from django.http import HttpResponse
from django.shortcuts import render
from django.shortcuts import redirect
+
+from django.core.files import File
+
+#from django.template.loader import render_to_string
import time
import random
+import mimetypes
def hello(request):
return HttpResponse('Hello Simpsons!
')
+#href="{{ STATIC_URL }}/files/somefile
)
+
+
+def download_file(request):
+ # fill these variables with real values
+ fl_path = '/data/download/sonarr'
+ filename = 'The.Boys.2019.S04E05.2160p.HDR10Plus.WEBRip.6CH.x265.HEVC-PSA.mkv'
+
+# fl = open(fl_path, 'r')
+# mime_type, _ = mimetypes.guess_type(fl_path)
+
+# response = HttpResponse(fl, content_type=mime_type)
+# response['Content-Disposition'] = "attachment; filename=%s" % filename
+ some_file = open('/data/kubernetes/Backup/nextcloud/notes/2024-07-28/Course.md', "r")
+ django_file = File(some_file)
+ return HttpResponse("Hello download!
bye download!
")
+# return response
+
+def download_mo(request,file):
+ path_to_file = os.path.realpath(file)
+ response = FileResponse(open(path_to_file, 'rb'))
+ file_name = file[5:]
+ response['Content-Disposition'] = 'inline; filename=' + file_name
+ return response
+
+#def template(request):
+# rendered = render_to_string("my_template.html", {"foo": "bar"})
+ #return HttpResponse('Hello !
')
def simpsons(request):
- simpsons_url = "https://www1.kisscartoon.online/episode/the-simpsons-season-";
+# simpsons_url = "https://www1.kisscartoon.online/episode/the-simpsons-season-";
+ simpsons_url = "https://kisscartoon.top/episode/the-simpsons-season-";
number_of_seasons = 35
seasons_maximum_number = [13,22,24,22,22,25,25,25,25,23,22,21,22,22,22,21,22,22,20,21,23,22,22,22,22,22,22,22,21,23,22,22,22,22,18]
diff --git a/django_code/random_simpsons/templates/my_template.html b/django_code/random_simpsons/templates/my_template.html
new file mode 100644
index 0000000..9cec98d
--- /dev/null
+++ b/django_code/random_simpsons/templates/my_template.html
@@ -0,0 +1 @@
+Hello template!