All checks were successful
Build containers when image tags change / build-if-image-changed (., web, containers, main container, git.baumann.gr/adebaumann/labhelper) (push) Successful in 20s
Build containers when image tags change / build-if-image-changed (data-loader, loader, initContainers, init-container, git.baumann.gr/adebaumann/labhelper-data-loader) (push) Successful in 5s
62 lines
2.3 KiB
Python
62 lines
2.3 KiB
Python
"""
|
|
URL configuration for labhelper project.
|
|
|
|
The `urlpatterns` list routes URLs to views. For more information please see:
|
|
https://docs.djangoproject.com/en/5.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.conf import settings
|
|
from django.conf.urls.static import static
|
|
from django.contrib import admin
|
|
from django.urls import path
|
|
from django.contrib.auth import views as auth_views
|
|
|
|
from boxes.views import (
|
|
add_box,
|
|
add_box_type,
|
|
add_things,
|
|
box_detail,
|
|
box_management,
|
|
delete_box,
|
|
delete_box_type,
|
|
edit_box,
|
|
edit_box_type,
|
|
index,
|
|
search,
|
|
search_api,
|
|
thing_detail,
|
|
thing_type_detail,
|
|
)
|
|
|
|
urlpatterns = [
|
|
path('login/', auth_views.LoginView.as_view(template_name='login.html'), name='login'),
|
|
path('logout/', auth_views.LogoutView.as_view(), name='logout'),
|
|
path('', index, name='index'),
|
|
path('box-management/', box_management, name='box_management'),
|
|
path('box-type/add/', add_box_type, name='add_box_type'),
|
|
path('box-type/<int:type_id>/edit/', edit_box_type, name='edit_box_type'),
|
|
path('box-type/<int:type_id>/delete/', delete_box_type, name='delete_box_type'),
|
|
path('box/add/', add_box, name='add_box'),
|
|
path('box/<str:box_id>/edit/', edit_box, name='edit_box'),
|
|
path('box/<str:box_id>/delete/', delete_box, name='delete_box'),
|
|
path('box/<str:box_id>/', box_detail, name='box_detail'),
|
|
path('thing/<int:thing_id>/', thing_detail, name='thing_detail'),
|
|
path('thing-type/<int:type_id>/', thing_type_detail, name='thing_type_detail'),
|
|
path('box/<str:box_id>/add/', add_things, name='add_things'),
|
|
path('search/', search, name='search'),
|
|
path('search/api/', search_api, name='search_api'),
|
|
path('admin/', admin.site.urls),
|
|
]
|
|
|
|
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
|
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|