diff --git a/core/__pycache__/admin.cpython-311.pyc b/core/__pycache__/admin.cpython-311.pyc index a5ed392..8640881 100644 Binary files a/core/__pycache__/admin.cpython-311.pyc and b/core/__pycache__/admin.cpython-311.pyc differ diff --git a/core/__pycache__/models.cpython-311.pyc b/core/__pycache__/models.cpython-311.pyc index e061640..c139c5a 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 5a69659..c55b7ad 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 2a36fd6..03a6b38 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..16fbc63 100644 --- a/core/admin.py +++ b/core/admin.py @@ -1,3 +1,8 @@ from django.contrib import admin +from .models import InventoryItem -# Register your models here. +@admin.register(InventoryItem) +class InventoryItemAdmin(admin.ModelAdmin): + list_display = ('name', 'store_name', 'cost', 'store_location', 'lead_time') + search_fields = ('name', 'store_name', 'features', 'description') + list_filter = ('store_name', 'store_location') \ 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..4d4f079 --- /dev/null +++ b/core/migrations/0001_initial.py @@ -0,0 +1,31 @@ +# Generated by Django 5.2.7 on 2026-02-12 13:02 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='InventoryItem', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=255)), + ('description', models.TextField(blank=True)), + ('cost', models.DecimalField(decimal_places=2, max_digits=10)), + ('installments_options', models.CharField(help_text='e.g., 12 months interest free', max_length=255)), + ('features', models.TextField(help_text='Comma separated features')), + ('store_location', models.CharField(max_length=255)), + ('store_name', models.CharField(max_length=255)), + ('lead_time', models.CharField(help_text='e.g., 3-5 days', max_length=100)), + ('image_url', models.URLField(blank=True, null=True)), + ('created_at', models.DateTimeField(auto_now_add=True)), + ('updated_at', models.DateTimeField(auto_now=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..b11edc2 Binary files /dev/null and b/core/migrations/__pycache__/0001_initial.cpython-311.pyc differ diff --git a/core/models.py b/core/models.py index 71a8362..92696ae 100644 --- a/core/models.py +++ b/core/models.py @@ -1,3 +1,18 @@ from django.db import models -# Create your models here. +class InventoryItem(models.Model): + name = models.CharField(max_length=255) + description = models.TextField(blank=True) + cost = models.DecimalField(max_digits=10, decimal_places=2) + installments_options = models.CharField(max_length=255, help_text="e.g., 12 months interest free") + features = models.TextField(help_text="Comma separated features") + store_location = models.CharField(max_length=255) + store_name = models.CharField(max_length=255) + lead_time = models.CharField(max_length=100, help_text="e.g., 3-5 days") + image_url = models.URLField(blank=True, null=True) + + created_at = models.DateTimeField(auto_now_add=True) + updated_at = models.DateTimeField(auto_now=True) + + def __str__(self): + return f"{self.name} - {self.store_name}" \ No newline at end of file diff --git a/core/templates/base.html b/core/templates/base.html index 1e7e5fb..01dfd50 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -1,25 +1,92 @@ - +{% load static %}
-