Merge pull request 'Testing' (#31) from testing into main
Dockerfile runner / Explore-Gitea-Actions (push) Successful in 50s

Reviewed-on: http://gitea.geeraert.eu/pi-ux-ce/Django_kube/pulls/31
This commit was merged in pull request #31.
This commit is contained in:
2026-09-02 11:47:22 +00:00
16 changed files with 234 additions and 99 deletions
+40
View File
@@ -0,0 +1,40 @@
"""
URL configuration for django_code project.
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from apps.cloudmanager import apps as cloudmanager_apps
from apps.cloudmanager import views as cloudmanager_views
urlpatterns = [
################### cloudmanager ###################
path('/', cloudmanager_apps.redirect),
path('/hello', cloudmanager_apps.hello, name='hello'),
path('/coucou', cloudmanager_views.coucou, name='coucou'),
path('/display', cloudmanager_views.display, name='display'),
#path('/run-action/', cloudmanager_views.trigger_my_action, name='run_my_action_url'),
#path('change-schedule/', cloudmanager_views.change_schedule, name='change_schedule'),
#path('/main/', db_interaction.main),
################### onenote ###################
path('dashboard/', dashboardapp.hello),
path('view/about', dashboardview.about),
path('view/home', dashboardview.home),
path('view/success', dashboardview.success),
path('scale_up/<str:namespace_name>/<str:deploy_name>', dashboardview.scale_up),
path('scale_down/<str:namespace_name>/<str:deploy_name>', dashboardview.scale_down),
]
@@ -0,0 +1,30 @@
"""
URL configuration for django_code project.
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from apps.kubernetes_connection import apps as kubernetes_connection
urlpatterns = [
################## kubernetes_connection#####
path('hello/', kubernetes_connection.hello),
path('nodes/', kubernetes_connection.nodes),
path('backup_job/', kubernetes_connection.backup_job),
path('backup_job_yaml/', kubernetes_connection.backup_job_yaml),
path('scale_up/<str:namespace_name>/<str:deploy_name>', kubernetes_connection.scale_up),
path('scale_down/<str:namespace_name>/<str:deploy_name>', kubernetes_connection.scale_down),
]
@@ -0,0 +1,25 @@
"""
URL configuration for django_code project.
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from apps.podcast_aggregator import views as podcast_views
urlpatterns = [
################### cloudmanager ###################
path('', podcast_views.execute_podcast),
]
+26
View File
@@ -0,0 +1,26 @@
"""
URL configuration for django_code project.
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from apps.random_simpsons import views as random_simpsons
urlpatterns = [
################### Simpsons ###################
path('hello', random_simpsons.hello),
path('', random_simpsons.episode_generator),
path('download_file/', random_simpsons.download_file),
]
+34
View File
@@ -0,0 +1,34 @@
"""
URL configuration for django_code project.
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from apps.stash_management import apps as stashapp
from apps.stash_management import views as stashview
urlpatterns = [
################## stash #####
path('', stashview.home),
path('hello/', stashapp.hello),
path('form/', stashapp.form),
path('incremental/', stashapp.incremental),
path('album/', stashapp.album),
path('album-form/', stashapp.album_form, name='submit_form'),
path('simple/', stashapp.simple),
path('simple-form/', stashapp.simple_form, name='submit_form'),
path('submit-form/', stashapp.handle_survey_form, name='submit_form'),
path('incremental-form/', stashapp.incremental_form, name='submit_form'),
]
+25
View File
@@ -0,0 +1,25 @@
"""
URL configuration for django_code project.
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from apps.streaming import views as streaming_views
urlpatterns = [
################### streaming ###################
path('hello', streaming_views.hello),
path('<str:alias>', streaming_views.streamingRedirect),
]
@@ -19,7 +19,6 @@ from django.urls import path
from apps.website_redirection import views as website_redirectionapp
urlpatterns = [
# path('admin/', admin.site.urls),
################### Redirect ###################
path('', website_redirectionapp.redirect),
@@ -30,6 +29,4 @@ urlpatterns = [
path('redirect-form/', website_redirectionapp.redirect_process, name='submit_form'),
path('clearkey/', website_redirectionapp.clearkey_process, name='submit_form'),
]
+21
View File
@@ -0,0 +1,21 @@
from django.conf import settings
from django_hosts import patterns, host
#ADMIN
# redirect
# streaming
# cloudmanager
# stash
# podcast
# simpsons
host_patterns = patterns('',
host(r"admin-testing", settings.ROOT_URLCONF, name="admin"),
host(r"redirect-testing", 'apps.website_redirection.urls', name="redirect"),
host(r"streaming-testing", 'apps.streaming.urls', name="streaming"),
host(r"stash-testing", 'apps.stash_management.urls', name="stash"),
host(r"podcast-testing", 'apps.podcast_aggregator.urls', name="podcast"),
host(r"simpsons-testing", 'apps.random_simpsons.urls', name="simpsons"),
host(r"kubernetes-testing", 'apps.kubernetes_connection.urls', name="kubernetes"),
host(r"cloudmanager-testing", 'apps.cloudmanager.urls', name="cloudmanager"),
)
+15 -4
View File
@@ -1,10 +1,21 @@
from django.conf import settings
from django_hosts import patterns, host
#ADMIN
# redirect
# streaming
# cloudmanager
# stash
# podcast
# simpsons
host_patterns = patterns('',
host(r"django-testing", settings.ROOT_URLCONF, name="django-testing"),
host(r"admin", settings.ROOT_URLCONF, name="admin"),
host(r"redirect", 'apps.website_redirection.urls', name="redirect"),
host(r"redirect-testing", 'apps.website_redirection.urls', name="redirect-testing"),
host(r"job", 'apps.job_dashboard.urls', name="job_dashboard"),
host(r"job-testing", 'apps.job_dashboard.urls', name="job_dashboard-testing"),
host(r"streaming", 'apps.streaming.urls', name="streaming"),
host(r"stash", 'apps.stash_management.urls', name="stash"),
host(r"podcast", 'apps.podcast_aggregator.urls', name="podcast"),
host(r"simpsons", 'apps.random_simpsons.urls', name="simpsons"),
host(r"kubernetes", 'apps.kubernetes_connection.urls', name="kubernetes"),
host(r"cloudmanager", 'apps.cloudmanager.urls', name="cloudmanager"),
)
+8 -2
View File
@@ -69,8 +69,14 @@ MIDDLEWARE = [
]
ROOT_URLCONF = 'core.urls'
ROOT_HOSTCONF = 'core.hosts'
DEFAULT_HOST = 'django-testing'
ENVIRONMENT = os.getenv("ENVIRONMENT","TESTING")
if ENVIRONMENT == "PRODUCTION":
ROOT_HOSTCONF = 'core.hosts'
else:
ROOT_HOSTCONF = 'core.hosts-testing'
DEFAULT_HOST = 'admin'
TEMPLATES = [
+1 -81
View File
@@ -16,87 +16,7 @@ Including another URLconf
"""
from django.contrib import admin
from django.urls import path
#from apps.cloudmanager import (credentials,db_interaction)
from apps.cloudmanager import apps as cloudmanager_apps
from apps.cloudmanager import views as cloudmanager_views
from apps.random_simpsons import views as random_simpsons
from apps.dashboard import apps as dashboardapp
from apps.dashboard import views as dashboardview
from apps.kubernetes_connection import apps as kubernetes_connection
from apps.stash_management import apps as stashapp
from apps.stash_management import views as stashview
from apps.website_redirection import views as website_redirectionapp
from apps.podcast_aggregator import views as podcast_views
from apps.streaming import views as streaming_views
urlpatterns = [
path('admin/', admin.site.urls),
################### Simpsons ###################
path('hello/', random_simpsons.hello),
path('simpsons/', random_simpsons.episode_generator),
path('download_file/', random_simpsons.download_file),
################### Redirect ###################
path('redirect/hello/', website_redirectionapp.hello),
path('redirect/set/', website_redirectionapp.redirect),
path('redirect/get/<str:key>', website_redirectionapp.display_key),
path('redirect/go/<str:key>', website_redirectionapp.redirect_to_key),
path('redirect-form/', website_redirectionapp.redirect_process, name='submit_form'),
path('redirect/clearkey/', website_redirectionapp.clearkey_process, name='submit_form'),
################### onenote ###################
path('dashboard/hello/', dashboardapp.hello),
path('dashboard/view/about', dashboardview.about),
path('dashboard/view/home', dashboardview.home),
path('dashboard/view/success', dashboardview.success),
path('dashboard/scale_up/<str:namespace_name>/<str:deploy_name>', dashboardview.scale_up),
path('dashboard/scale_down/<str:namespace_name>/<str:deploy_name>', dashboardview.scale_down),
################## kubernetes_connection#####
path('kubernetes_connection/hello/', kubernetes_connection.hello),
path('kubernetes_connection/nodes/', kubernetes_connection.nodes),
path('kubernetes_connection/backup_job/', kubernetes_connection.backup_job),
path('kubernetes_connection/backup_job_yaml/', kubernetes_connection.backup_job_yaml),
path('kubernetes_connection/scale_up/<str:namespace_name>/<str:deploy_name>', kubernetes_connection.scale_up),
path('kubernetes_connection/scale_down/<str:namespace_name>/<str:deploy_name>', kubernetes_connection.scale_down),
################## stash#####
path('stash/', stashview.home),
path('stash/hello/', stashapp.hello),
path('stash/form/', stashapp.form),
path('stash/incremental/', stashapp.incremental),
path('stash/album/', stashapp.album),
path('stash/album-form/', stashapp.album_form, name='submit_form'),
path('stash/simple/', stashapp.simple),
path('stash/simple-form/', stashapp.simple_form, name='submit_form'),
path('stash/submit-form/', stashapp.handle_survey_form, name='submit_form'),
path('stash/incremental-form/', stashapp.incremental_form, name='submit_form'),
# 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/<str:action>/<str:id_docker>', docker_connection.apps.docker_call),
################### cloudmanager ###################
path('cmm/', cloudmanager_apps.redirect),
path('cmm/hello', cloudmanager_apps.hello, name='hello'),
path('cmm/coucou', cloudmanager_views.coucou, name='coucou'),
path('cmm/display', cloudmanager_views.display, name='display'),
#path('cmm/run-action/', cloudmanager_views.trigger_my_action, name='run_my_action_url'),
#path('change-schedule/', cloudmanager_views.change_schedule, name='change_schedule'),
#path('cmm/main/', db_interaction.main),
################### cloudmanager ###################
path('podcast/', podcast_views.execute_podcast),
################### streaming ###################
path('streaming/', streaming_views.hello),
path('streaming/go/<str:alias>', streaming_views.streamingRedirect),
path('', admin.site.urls)
]
+1 -1
View File
@@ -259,7 +259,7 @@
<h1 id="title">Stash Form</h1>
<p id="description" class="description" class="text-center">Download form</p>
</div>
<form method="GET" action="/stash/album-form/" id="survey-form" name="survey-form">
<form method="GET" action="/album-form/" id="survey-form" name="survey-form">
<fieldset>
<label for="name" id="name-label">
@@ -259,7 +259,7 @@
<h1 id="title">Incremental Form</h1>
<p id="description" class="description" class="text-center">Download form</p>
</div>
<form method="GET" action="/stash/incremental-form/" id="survey-form" name="survey-form">
<form method="GET" action="/incremental-form/" id="survey-form" name="survey-form">
<fieldset>
<label for="name" id="name-label">
+5 -5
View File
@@ -10852,7 +10852,7 @@
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" id="navbarDropdown" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">Technologies</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
<li><a class="dropdown-item" href="/stash/incremental/">Incremental</a></li>
<li><a class="dropdown-item" href="/incremental/">Incremental</a></li>
<li><hr class="dropdown-divider" /></li>
<li><a class="dropdown-item" href="#!">Album</a></li>
</ul>
@@ -10887,7 +10887,7 @@
</div>
<!-- Product actions-->
<div class="card-footer p-4 pt-0 border-top-0 bg-transparent">
<div class="text-center"><a class="btn btn-outline-dark mt-auto" href="/stash/incremental/">Visit</a></div>
<div class="text-center"><a class="btn btn-outline-dark mt-auto" href="/incremental/">Visit</a></div>
</div>
</div>
</div>
@@ -10908,7 +10908,7 @@
</div>
<!-- Product actions-->
<div class="card-footer p-4 pt-0 border-top-0 bg-transparent">
<div class="text-center"><a class="btn btn-outline-dark mt-auto" href="/stash/incremental/">Visit</a></div>
<div class="text-center"><a class="btn btn-outline-dark mt-auto" href="/incremental/">Visit</a></div>
</div>
</div>
</div>
@@ -10928,7 +10928,7 @@
</div>
<!-- Product actions-->
<div class="card-footer p-4 pt-0 border-top-0 bg-transparent">
<div class="text-center"><a class="btn btn-outline-dark mt-auto" href="/stash/album/">Visit</a></div>
<div class="text-center"><a class="btn btn-outline-dark mt-auto" href="/album/">Visit</a></div>
</div>
</div>
</div>
@@ -10975,7 +10975,7 @@
</div>
<!-- Product actions-->
<div class="card-footer p-4 pt-0 border-top-0 bg-transparent">
<div class="text-center"><a class="btn btn-outline-dark mt-auto" href="/stash/simple">Visit</a></div>
<div class="text-center"><a class="btn btn-outline-dark mt-auto" href="/simple">Visit</a></div>
</div>
</div>
</div>
+1 -1
View File
@@ -259,7 +259,7 @@
<h1 id="title">Stash Form</h1>
<p id="description" class="description" class="text-center">Download form</p>
</div>
<form method="GET" action="/stash/simple-form/" id="survey-form" name="survey-form">
<form method="GET" action="/simple-form/" id="survey-form" name="survey-form">
<fieldset>
<label for="name" id="name-label">
+1 -1
View File
@@ -259,7 +259,7 @@
<h1 id="title">Stash Form</h1>
<p id="description" class="description" class="text-center">Download form</p>
</div>
<form method="GET" action="/stash/submit-form/" id="survey-form" name="survey-form">
<form method="GET" action="/submit-form/" id="survey-form" name="survey-form">
<fieldset>
<label for="name" id="name-label">