summaryrefslogtreecommitdiff
path: root/web_interface/django_project/urls.py
diff options
context:
space:
mode:
authoruser@node5.net <user@node5.net>2025-12-16 22:04:36 +0100
committeruser@node5.net <user@node5.net>2025-12-16 22:04:36 +0100
commit24d43660b30bd6d51da57fb1d777c8960569f980 (patch)
tree82451c33c333516fb6f88de4a2715eb2940d783b /web_interface/django_project/urls.py
parent133e9fd4e4248de394c3a846fe15b271dbf7ac55 (diff)
Rename django foldermain
Diffstat (limited to 'web_interface/django_project/urls.py')
-rw-r--r--web_interface/django_project/urls.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/web_interface/django_project/urls.py b/web_interface/django_project/urls.py
new file mode 100644
index 0000000..aaafc65
--- /dev/null
+++ b/web_interface/django_project/urls.py
@@ -0,0 +1,30 @@
+"""
+URL configuration for drinks_machine project.
+
+The `urlpatterns` list routes URLs to views. For more information please see:
+ https://docs.djangoproject.com/en/6.0/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, include
+from django.views.generic import RedirectView
+from django.conf.urls.static import static
+from django.conf import settings
+
+urlpatterns = [
+ path('admin/', admin.site.urls),
+ path("drinks/", include("drinks.urls")),
+ path('', RedirectView.as_view(url='/drinks/', permanent=False), name='redirect'),
+ path("motor-controls/", include("motor_controls.urls")),
+] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + \
+ static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
+