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/myfirstproject/migrations/0005_product_in_stock_alter_product_amount_product_and_more.py b/myfirstproject/migrations/0005_product_in_stock_alter_product_amount_product_and_more.py new file mode 100644 index 0000000..58a0e5c --- /dev/null +++ b/myfirstproject/migrations/0005_product_in_stock_alter_product_amount_product_and_more.py @@ -0,0 +1,29 @@ +# Generated by Django 4.0.6 on 2022-08-16 12:07 + +import django.core.validators +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('myfirstproject', '0004_product'), + ] + + operations = [ + migrations.AddField( + model_name='product', + name='in_stock', + field=models.BooleanField(blank=True, null=True), + ), + migrations.AlterField( + model_name='product', + name='amount_product', + field=models.IntegerField(null=True, validators=[django.core.validators.MinValueValidator(0)]), + ), + migrations.AlterField( + model_name='product', + name='price_product', + field=models.IntegerField(null=True, validators=[django.core.validators.MinValueValidator(0)]), + ), + ] 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 %}