From 666c9005e0e0b1b8afdcac204f9cf345c249bdd4 Mon Sep 17 00:00:00 2001 From: Ofir Matasas Date: Thu, 28 Apr 2022 23:00:49 +0300 Subject: [PATCH] Creating orders.html, presenting orders history A page on Hotails, where the user can watch the history of all of his orders, cancel the orders which havn't started yet, and approve orders as a daycare. Signed-off-by: Ofir Matasas --- Hotails/urls.py | 3 ++ main/templates/main/base_template.html | 2 +- main/tests.py | 26 +++++++++++ orders/models.py | 49 ++++++++++++++++++++ orders/templates/orders/orders.html | 54 ++++++++++++++++++++++ orders/tests.py | 63 ++++++++++++++++++++++++++ orders/views.py | 22 ++++++++- static/CSS/orders.css | 8 ++++ 8 files changed, 224 insertions(+), 3 deletions(-) create mode 100644 orders/templates/orders/orders.html create mode 100644 static/CSS/orders.css diff --git a/Hotails/urls.py b/Hotails/urls.py index 21257e0..17bf626 100644 --- a/Hotails/urls.py +++ b/Hotails/urls.py @@ -15,6 +15,8 @@ """ from django.contrib import admin from django.urls import path + +import orders.views from main import views from django.contrib.auth import views as auth_views @@ -26,4 +28,5 @@ path('homepage/', views.homepage, name='homepage'), path('logout/', views.logout_view, name='logout'), path('about/', views.about, name='about'), + path('orders/', orders.views.orders, name='orders'), ] diff --git a/main/templates/main/base_template.html b/main/templates/main/base_template.html index b045033..58d3f34 100644 --- a/main/templates/main/base_template.html +++ b/main/templates/main/base_template.html @@ -25,7 +25,7 @@