mirror of
https://github.com/welton89/RRBEC.git
synced 2026-04-05 13:35:42 +00:00
feat: create app orders and makemigrations
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -1,3 +1,6 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
from products.models import Product
|
||||
|
||||
|
||||
admin.site.register(Product)
|
||||
|
||||
18
gestaoRaul/products/migrations/0003_product_cuisine.py
Normal file
18
gestaoRaul/products/migrations/0003_product_cuisine.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.1.4 on 2025-01-10 16:24
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('products', '0002_product_image_product_quantity'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='product',
|
||||
name='cuisine',
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
]
|
||||
Binary file not shown.
@@ -11,6 +11,7 @@ class Product(models.Model):
|
||||
price = models.DecimalField(max_digits=10, decimal_places=2)
|
||||
quantity = models.IntegerField(null=False, default=0)
|
||||
category = models.ForeignKey(Categories, on_delete=models.CASCADE)
|
||||
cuisine = models.BooleanField(default=False)
|
||||
active = models.BooleanField(default=True)
|
||||
|
||||
def __str__(self) -> str:
|
||||
|
||||
Reference in New Issue
Block a user