diff --git a/config/__pycache__/__init__.cpython-311.pyc b/config/__pycache__/__init__.cpython-311.pyc index 896bb4f..f9b2544 100644 Binary files a/config/__pycache__/__init__.cpython-311.pyc and b/config/__pycache__/__init__.cpython-311.pyc differ diff --git a/config/__pycache__/settings.cpython-311.pyc b/config/__pycache__/settings.cpython-311.pyc index d79d6a7..5288887 100644 Binary files a/config/__pycache__/settings.cpython-311.pyc and b/config/__pycache__/settings.cpython-311.pyc differ diff --git a/config/__pycache__/urls.cpython-311.pyc b/config/__pycache__/urls.cpython-311.pyc index 8cf22af..6183b58 100644 Binary files a/config/__pycache__/urls.cpython-311.pyc and b/config/__pycache__/urls.cpython-311.pyc differ diff --git a/config/__pycache__/wsgi.cpython-311.pyc b/config/__pycache__/wsgi.cpython-311.pyc index a1b4aa7..faf597c 100644 Binary files a/config/__pycache__/wsgi.cpython-311.pyc and b/config/__pycache__/wsgi.cpython-311.pyc differ diff --git a/core/__pycache__/__init__.cpython-311.pyc b/core/__pycache__/__init__.cpython-311.pyc index 3f553f6..37ebc89 100644 Binary files a/core/__pycache__/__init__.cpython-311.pyc and b/core/__pycache__/__init__.cpython-311.pyc differ diff --git a/core/__pycache__/admin.cpython-311.pyc b/core/__pycache__/admin.cpython-311.pyc index 5e8987a..12bb710 100644 Binary files a/core/__pycache__/admin.cpython-311.pyc and b/core/__pycache__/admin.cpython-311.pyc differ diff --git a/core/__pycache__/apps.cpython-311.pyc b/core/__pycache__/apps.cpython-311.pyc index 2fa4a49..351ab4a 100644 Binary files a/core/__pycache__/apps.cpython-311.pyc and b/core/__pycache__/apps.cpython-311.pyc differ diff --git a/core/__pycache__/context_processors.cpython-311.pyc b/core/__pycache__/context_processors.cpython-311.pyc index 75bf223..18c96f1 100644 Binary files a/core/__pycache__/context_processors.cpython-311.pyc and b/core/__pycache__/context_processors.cpython-311.pyc differ diff --git a/core/__pycache__/models.cpython-311.pyc b/core/__pycache__/models.cpython-311.pyc index a251b5f..1e2f5b2 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 f705988..e1c4a32 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 2f0989c..9bbc745 100644 Binary files a/core/__pycache__/views.cpython-311.pyc and b/core/__pycache__/views.cpython-311.pyc differ diff --git a/core/management/__init__.py b/core/management/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/core/management/__pycache__/__init__.cpython-311.pyc b/core/management/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000..80fddc8 Binary files /dev/null and b/core/management/__pycache__/__init__.cpython-311.pyc differ diff --git a/core/management/commands/__init__.py b/core/management/commands/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/core/management/commands/__pycache__/__init__.cpython-311.pyc b/core/management/commands/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000..acec91f Binary files /dev/null and b/core/management/commands/__pycache__/__init__.cpython-311.pyc differ diff --git a/core/management/commands/__pycache__/load_demo_data.cpython-311.pyc b/core/management/commands/__pycache__/load_demo_data.cpython-311.pyc new file mode 100644 index 0000000..de564f6 Binary files /dev/null and b/core/management/commands/__pycache__/load_demo_data.cpython-311.pyc differ diff --git a/core/management/commands/load_demo_data.py b/core/management/commands/load_demo_data.py new file mode 100644 index 0000000..74b8a16 --- /dev/null +++ b/core/management/commands/load_demo_data.py @@ -0,0 +1,18 @@ +from django.core.management.base import BaseCommand +from core.models import Product + +class Command(BaseCommand): + help = 'Populates the database with demo products' + + def handle(self, *args, **kwargs): + Product.objects.all().delete() + demo_data = [ + {"name": "Ethiopian Specialty Coffee", "price": 12.99, "description": "Authentic Yirgacheffe coffee beans, medium roast."}, + {"name": "Traditional Woven Scarf", "price": 25.50, "description": "Hand-woven cotton scarf with cultural patterns."}, + {"name": "Handmade Clay Vase", "price": 18.00, "description": "Beautifully crafted artisan clay vase for home decor."}, + {"name": "Organic Teff Flour", "price": 8.50, "description": "High-quality, gluten-free organic teff flour, 1kg."}, + {"name": "Leather Journal", "price": 15.00, "description": "Hand-stitched genuine leather notebook, perfect for sketching."}, + ] + for item in demo_data: + Product.objects.create(**item) + self.stdout.write(self.style.SUCCESS('Successfully added 5 demo products!')) diff --git a/core/migrations/0001_initial.py b/core/migrations/0001_initial.py new file mode 100644 index 0000000..49b5614 --- /dev/null +++ b/core/migrations/0001_initial.py @@ -0,0 +1,25 @@ +# Generated by Django 5.2.7 on 2026-03-12 23:37 + +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=200)), + ('description', models.TextField()), + ('price', models.DecimalField(decimal_places=2, max_digits=10)), + ('image', models.ImageField(blank=True, null=True, upload_to='products/')), + ('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..ba0dd32 Binary files /dev/null and b/core/migrations/__pycache__/0001_initial.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/__init__.cpython-311.pyc b/core/migrations/__pycache__/__init__.cpython-311.pyc index 7995815..4f39c9f 100644 Binary files a/core/migrations/__pycache__/__init__.cpython-311.pyc and b/core/migrations/__pycache__/__init__.cpython-311.pyc differ diff --git a/core/models.py b/core/models.py index 71a8362..c05de36 100644 --- a/core/models.py +++ b/core/models.py @@ -1,3 +1,11 @@ from django.db import models -# Create your models here. +class Product(models.Model): + name = models.CharField(max_length=200) + description = models.TextField() + price = models.DecimalField(max_digits=10, decimal_places=2) + image = models.ImageField(upload_to='products/', null=True, blank=True) + created_at = models.DateTimeField(auto_now_add=True) + + def __str__(self): + return self.name \ No newline at end of file diff --git a/core/templates/core/index.html b/core/templates/core/index.html index faec813..a4cc4c1 100644 --- a/core/templates/core/index.html +++ b/core/templates/core/index.html @@ -1,145 +1,26 @@ {% extends "base.html" %} -{% block title %}{{ project_name }}{% endblock %} - -{% block head %} - - - - -{% endblock %} +{% block title %}Ethio-Gebeya | Modern Marketplace{% endblock %} {% block content %} -
-
-

Analyzing your requirements and generating your app…

-
- Loading… -
-

AppWizzy AI is collecting your requirements and applying the first changes.

-

This page will refresh automatically as the plan is implemented.

-

- Runtime: Django {{ django_version }} · Python {{ python_version }} - — UTC {{ current_time|date:"Y-m-d H:i:s" }} -

+
+

Welcome to Ethio-Gebeya

+

Your premium destination for quality goods.

+
+
+
+ +
+ {% for product in products %} +
+

{{ product.name }}

+

{{ product.description|truncatewords:15 }}

+

ETB {{ product.price }}

+ View Details → +
+ {% empty %} +

No products available yet.

+ {% endfor %}
- {% endblock %} \ No newline at end of file diff --git a/core/views.py b/core/views.py index c9aed12..1bfab33 100644 --- a/core/views.py +++ b/core/views.py @@ -1,25 +1,10 @@ -import os -import platform - -from django import get_version as django_version from django.shortcuts import render -from django.utils import timezone - +from .models import Product def home(request): - """Render the landing screen with loader and environment details.""" - host_name = request.get_host().lower() - agent_brand = "AppWizzy" if host_name == "appwizzy.com" else "Flatlogic" - now = timezone.now() - + """Render the landing screen with products.""" + products = Product.objects.all() context = { - "project_name": "New Style", - "agent_brand": agent_brand, - "django_version": django_version(), - "python_version": platform.python_version(), - "current_time": now, - "host_name": host_name, - "project_description": os.getenv("PROJECT_DESCRIPTION", ""), - "project_image_url": os.getenv("PROJECT_IMAGE_URL", ""), + "products": products, } - return render(request, "core/index.html", context) + return render(request, "core/index.html", context) \ No newline at end of file diff --git a/static/css/custom.css b/static/css/custom.css index 925f6ed..020d029 100644 --- a/static/css/custom.css +++ b/static/css/custom.css @@ -1,4 +1,48 @@ -/* Custom styles for the application */ -body { - font-family: system-ui, -apple-system, sans-serif; +/* Professional Design - Ethio-Gebeya */ +@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Manrope:wght@600;700;800&display=swap'); + +:root { + --primary: #1F6FEB; + --secondary: #0F172A; + --accent: #F97316; + --bg: #F8FAFC; + --text: #1E293B; } + +body { + font-family: 'Inter', sans-serif; + background-color: var(--bg); + color: var(--text); + margin: 0; +} + +h1, h2, h3, .brand { + font-family: 'Manrope', sans-serif; +} + +.hero { + background: linear-gradient(135deg, var(--secondary), var(--primary)); + color: white; + padding: 80px 20px; + text-align: center; +} + +.product-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); + gap: 2rem; + padding: 40px 20px; +} + +.product-card { + background: white; + border-radius: 12px; + padding: 1.5rem; + box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); + transition: transform 0.2s, box-shadow 0.2s; +} + +.product-card:hover { + transform: translateY(-5px); + box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); +} \ No newline at end of file