diff --git a/core/__pycache__/admin.cpython-311.pyc b/core/__pycache__/admin.cpython-311.pyc index cd6f855..1d2d514 100644 Binary files a/core/__pycache__/admin.cpython-311.pyc and b/core/__pycache__/admin.cpython-311.pyc differ diff --git a/core/__pycache__/forms.cpython-311.pyc b/core/__pycache__/forms.cpython-311.pyc new file mode 100644 index 0000000..988a7a5 Binary files /dev/null and b/core/__pycache__/forms.cpython-311.pyc differ diff --git a/core/__pycache__/models.cpython-311.pyc b/core/__pycache__/models.cpython-311.pyc index 9aa598b..4ef3c7b 100644 Binary files a/core/__pycache__/models.cpython-311.pyc and b/core/__pycache__/models.cpython-311.pyc differ diff --git a/core/__pycache__/urls.cpython-311.pyc b/core/__pycache__/urls.cpython-311.pyc index 1f807fa..916fb0b 100644 Binary files a/core/__pycache__/urls.cpython-311.pyc and b/core/__pycache__/urls.cpython-311.pyc differ diff --git a/core/__pycache__/views.cpython-311.pyc b/core/__pycache__/views.cpython-311.pyc index 6867ddf..4956b13 100644 Binary files a/core/__pycache__/views.cpython-311.pyc and b/core/__pycache__/views.cpython-311.pyc differ diff --git a/core/admin.py b/core/admin.py index 8c38f3f..3133884 100644 --- a/core/admin.py +++ b/core/admin.py @@ -1,3 +1,5 @@ from django.contrib import admin +from .models import Product, TankOrder -# Register your models here. +admin.site.register(Product) +admin.site.register(TankOrder) \ No newline at end of file diff --git a/core/forms.py b/core/forms.py new file mode 100644 index 0000000..e359fb5 --- /dev/null +++ b/core/forms.py @@ -0,0 +1,7 @@ +from django import forms +from .models import TankOrder + +class TankOrderForm(forms.ModelForm): + class Meta: + model = TankOrder + fields = ['name', 'address', 'phone', 'tank_size'] \ No newline at end of file diff --git a/core/migrations/0001_initial.py b/core/migrations/0001_initial.py new file mode 100644 index 0000000..6d1f8ce --- /dev/null +++ b/core/migrations/0001_initial.py @@ -0,0 +1,24 @@ +# Generated by Django 5.2.7 on 2026-01-18 08:30 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Product', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=255)), + ('description', models.TextField()), + ('capacity', models.IntegerField()), + ('price', models.DecimalField(decimal_places=2, max_digits=10)), + ], + ), + ] diff --git a/core/migrations/0002_tankorder.py b/core/migrations/0002_tankorder.py new file mode 100644 index 0000000..f8e0170 --- /dev/null +++ b/core/migrations/0002_tankorder.py @@ -0,0 +1,24 @@ +# Generated by Django 5.2.7 on 2026-01-18 08:46 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('core', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='TankOrder', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=100)), + ('address', models.CharField(max_length=255)), + ('phone', models.CharField(max_length=20)), + ('tank_size', models.CharField(max_length=50)), + ('created_at', models.DateTimeField(auto_now_add=True)), + ], + ), + ] diff --git a/core/migrations/__pycache__/0001_initial.cpython-311.pyc b/core/migrations/__pycache__/0001_initial.cpython-311.pyc new file mode 100644 index 0000000..f1d7dbf Binary files /dev/null and b/core/migrations/__pycache__/0001_initial.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0002_tankorder.cpython-311.pyc b/core/migrations/__pycache__/0002_tankorder.cpython-311.pyc new file mode 100644 index 0000000..18b16d7 Binary files /dev/null and b/core/migrations/__pycache__/0002_tankorder.cpython-311.pyc differ diff --git a/core/models.py b/core/models.py index 71a8362..b654481 100644 --- a/core/models.py +++ b/core/models.py @@ -1,3 +1,21 @@ from django.db import models -# Create your models here. +class Product(models.Model): + name = models.CharField(max_length=255) + description = models.TextField() + capacity = models.IntegerField() # In liters + price = models.DecimalField(max_digits=10, decimal_places=2) + # image = models.ImageField(upload_to='products/', null=True, blank=True) + + def __str__(self): + return self.name + +class TankOrder(models.Model): + name = models.CharField(max_length=100) + address = models.CharField(max_length=255) + phone = models.CharField(max_length=20) + tank_size = models.CharField(max_length=50) + created_at = models.DateTimeField(auto_now_add=True) + + def __str__(self): + return f"Order for {self.name} at {self.address}" \ No newline at end of file diff --git a/core/templates/base.html b/core/templates/base.html index 1e7e5fb..8d6fe78 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -13,13 +13,51 @@ {% endif %} + + + + {% load static %} {% block head %}{% endblock %}
- {% block content %}{% endblock %} +