This commit is contained in:
@@ -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('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),
|
||||||
|
|
||||||
|
################### 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),
|
||||||
|
|
||||||
|
]
|
||||||
@@ -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('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),
|
||||||
|
|
||||||
|
]
|
||||||
@@ -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/', podcast_views.execute_podcast),
|
||||||
|
|
||||||
|
]
|
||||||
@@ -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('simpsons/', random_simpsons.episode_generator),
|
||||||
|
path('download_file/', random_simpsons.download_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('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'),
|
||||||
|
]
|
||||||
@@ -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('streaming/', streaming_views.hello),
|
||||||
|
path('streaming/go/<str:alias>', streaming_views.streamingRedirect),
|
||||||
|
]
|
||||||
@@ -19,7 +19,6 @@ from django.urls import path
|
|||||||
from apps.website_redirection import views as website_redirectionapp
|
from apps.website_redirection import views as website_redirectionapp
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
# path('admin/', admin.site.urls),
|
|
||||||
|
|
||||||
################### Redirect ###################
|
################### Redirect ###################
|
||||||
path('', website_redirectionapp.redirect),
|
path('', website_redirectionapp.redirect),
|
||||||
@@ -30,6 +29,4 @@ urlpatterns = [
|
|||||||
path('redirect-form/', website_redirectionapp.redirect_process, name='submit_form'),
|
path('redirect-form/', website_redirectionapp.redirect_process, name='submit_form'),
|
||||||
path('clearkey/', website_redirectionapp.clearkey_process, name='submit_form'),
|
path('clearkey/', website_redirectionapp.clearkey_process, name='submit_form'),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -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"),
|
||||||
|
)
|
||||||
@@ -1,10 +1,21 @@
|
|||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django_hosts import patterns, host
|
from django_hosts import patterns, host
|
||||||
|
|
||||||
|
#ADMIN
|
||||||
|
# redirect
|
||||||
|
# streaming
|
||||||
|
# cloudmanager
|
||||||
|
# stash
|
||||||
|
# podcast
|
||||||
|
# simpsons
|
||||||
|
|
||||||
host_patterns = patterns('',
|
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", 'apps.website_redirection.urls', name="redirect"),
|
||||||
host(r"redirect-testing", 'apps.website_redirection.urls', name="redirect-testing"),
|
host(r"streaming", 'apps.streaming.urls', name="streaming"),
|
||||||
host(r"job", 'apps.job_dashboard.urls', name="job_dashboard"),
|
host(r"stash", 'apps.stash_management.urls', name="stash"),
|
||||||
host(r"job-testing", 'apps.job_dashboard.urls', name="job_dashboard-testing"),
|
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"),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -69,8 +69,14 @@ MIDDLEWARE = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
ROOT_URLCONF = 'core.urls'
|
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 = [
|
TEMPLATES = [
|
||||||
|
|||||||
@@ -16,87 +16,7 @@ Including another URLconf
|
|||||||
"""
|
"""
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.urls import path
|
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 = [
|
urlpatterns = [
|
||||||
path('admin/', admin.site.urls),
|
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),
|
|
||||||
|
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user