From 78762e9487b7858d86141bb871b9e4cac4ee0d70 Mon Sep 17 00:00:00 2001 From: Andrey Britt Date: Fri, 19 Aug 2022 16:06:28 +0300 Subject: [PATCH 1/2] before delete url and html file --- djangoProject/views.py | 2 +- .../templates}/apple.html | 4 ++-- .../templates}/fish.html | 4 ++-- .../templates}/milk.html | 6 +++--- .../templates/product/product-detail.html | 0 myfirstproject/urls.py | 9 ++++++--- myfirstproject/views.py | 17 ++++++++++++++++- 7 files changed, 30 insertions(+), 12 deletions(-) rename {templates => myfirstproject/templates}/apple.html (71%) rename {templates => myfirstproject/templates}/fish.html (70%) rename {templates => myfirstproject/templates}/milk.html (55%) rename templates/product.html => myfirstproject/templates/product/product-detail.html (100%) diff --git a/djangoProject/views.py b/djangoProject/views.py index a804068..130cc3c 100644 --- a/djangoProject/views.py +++ b/djangoProject/views.py @@ -11,7 +11,7 @@ def profile1(request: HttpRequest): def product1(request: HttpRequest): - return render(request, "product.html", { + return render(request, "product/product-detail.html", { "quantity_null": True }) diff --git a/templates/apple.html b/myfirstproject/templates/apple.html similarity index 71% rename from templates/apple.html rename to myfirstproject/templates/apple.html index 9904227..f546b3a 100644 --- a/templates/apple.html +++ b/myfirstproject/templates/apple.html @@ -1,4 +1,4 @@ -{% extends 'product.html' %} +{% extends 'product/product-detail.html' %} {% block title %} apple @@ -11,7 +11,7 @@

Page product apple

{% block content %}