diff --git a/config/__pycache__/settings.cpython-311.pyc b/config/__pycache__/settings.cpython-311.pyc
index 5be02db..0d0c817 100644
Binary files a/config/__pycache__/settings.cpython-311.pyc and b/config/__pycache__/settings.cpython-311.pyc differ
diff --git a/config/settings.py b/config/settings.py
index 291d043..f121c46 100644
--- a/config/settings.py
+++ b/config/settings.py
@@ -180,3 +180,8 @@ if EMAIL_USE_SSL:
# https://docs.djangoproject.com/en/5.2/ref/settings/#default-auto-field
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
+
+# Login/Logout URLs
+LOGIN_URL = '/login/'
+LOGIN_REDIRECT_URL = '/'
+LOGOUT_REDIRECT_URL = '/login/'
diff --git a/core/__pycache__/admin.cpython-311.pyc b/core/__pycache__/admin.cpython-311.pyc
index cd6f855..db94a99 100644
Binary files a/core/__pycache__/admin.cpython-311.pyc and b/core/__pycache__/admin.cpython-311.pyc differ
diff --git a/core/__pycache__/context_processors.cpython-311.pyc b/core/__pycache__/context_processors.cpython-311.pyc
new file mode 100644
index 0000000..e85aca4
Binary files /dev/null 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 9aa598b..9439468 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..f7f96d2 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..3cd026f 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..d72dc0f 100644
--- a/core/admin.py
+++ b/core/admin.py
@@ -1,3 +1,8 @@
from django.contrib import admin
+from .models import Product
-# Register your models here.
+@admin.register(Product)
+class ProductAdmin(admin.ModelAdmin):
+ list_display = ('name', 'price', 'category', 'has_deposit')
+ list_filter = ('category', 'has_deposit')
+ search_fields = ('name',)
\ 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..21357e0
--- /dev/null
+++ b/core/migrations/0001_initial.py
@@ -0,0 +1,25 @@
+# Generated by Django 5.2.7 on 2026-01-19 20:59
+
+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=100)),
+ ('price', models.DecimalField(decimal_places=2, max_digits=6)),
+ ('category', models.CharField(choices=[('food', 'Food'), ('drink', 'Drink')], default='drink', max_length=20)),
+ ('has_deposit', models.BooleanField(default=False)),
+ ('image_url', models.URLField(blank=True, help_text='Optional URL for product image.', null=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..c0dc17c
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..a6cdb60 100644
--- a/core/models.py
+++ b/core/models.py
@@ -1,3 +1,16 @@
from django.db import models
-# Create your models here.
+class Product(models.Model):
+ CATEGORY_CHOICES = [
+ ('food', 'Food'),
+ ('drink', 'Drink'),
+ ]
+
+ name = models.CharField(max_length=100)
+ price = models.DecimalField(max_digits=6, decimal_places=2)
+ category = models.CharField(max_length=20, choices=CATEGORY_CHOICES, default='drink')
+ has_deposit = models.BooleanField(default=False)
+ image_url = models.URLField(max_length=200, blank=True, null=True, help_text="Optional URL for product image.")
+
+ def __str__(self):
+ return self.name
\ No newline at end of file
diff --git a/core/templates/base.html b/core/templates/base.html
index 1e7e5fb..3910e4c 100644
--- a/core/templates/base.html
+++ b/core/templates/base.html
@@ -15,6 +15,11 @@
{% endif %}
{% load static %}
+
+
+
+
+
{% block head %}{% endblock %}
diff --git a/core/templates/core/index.html b/core/templates/core/index.html
index faec813..b218fee 100644
--- a/core/templates/core/index.html
+++ b/core/templates/core/index.html
@@ -1,145 +1,70 @@
{% extends "base.html" %}
+{% load static %}
-{% block title %}{{ project_name }}{% endblock %}
-
-{% block head %}
-
-
-
-
-{% endblock %}
+{% block title %}EventKasse POS{% 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" }}
-
-
-
-
-{% endblock %}
\ No newline at end of file
+
+
+
+
+
+ {% for category, products in grouped_products.items %}
+
{{ category }}
+
+ {% for product in products %}
+
+
+
{{ product.name }}
+
€{{ product.price|stringformat:".2f" }}
+
+
+ {% endfor %}
+
+ {% empty %}
+
+
+
+
No Products Found
+
Please add some products in the Django Admin to get started.
+
+
+
+ {% endfor %}
+
+
+
+
+
+{% endblock %}
diff --git a/core/templates/core/login.html b/core/templates/core/login.html
new file mode 100644
index 0000000..0349aa0
--- /dev/null
+++ b/core/templates/core/login.html
@@ -0,0 +1,99 @@
+{% extends "base.html" %}
+{% load static %}
+
+{% block title %}Login - EventKasse{% endblock %}
+
+{% block content %}
+
+
+
+{% endblock %}
diff --git a/core/urls.py b/core/urls.py
index 6299e3d..f6d3085 100644
--- a/core/urls.py
+++ b/core/urls.py
@@ -1,7 +1,10 @@
from django.urls import path
-
-from .views import home
+from django.contrib.auth.views import LoginView, LogoutView
+from .views import index, article_detail
urlpatterns = [
- path("", home, name="home"),
+ path("", index, name="index"),
+ path("article_detail", article_detail, name="article_detail"),
+ path("login/", LoginView.as_view(template_name='core/login.html'), name="login"),
+ path("logout/", LogoutView.as_view(), name="logout"),
]
diff --git a/core/views.py b/core/views.py
index c9aed12..ad11146 100644
--- a/core/views.py
+++ b/core/views.py
@@ -1,25 +1,20 @@
-import os
-import platform
-
-from django import get_version as django_version
+from django.contrib.auth.decorators import login_required
from django.shortcuts import render
-from django.utils import timezone
+from .models import Product
+from collections import defaultdict
-
-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()
+@login_required
+def index(request):
+ products = Product.objects.all().order_by('category', 'name')
+ grouped_products = defaultdict(list)
+ for product in products:
+ grouped_products[product.category].append(product)
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", ""),
+ 'grouped_products': dict(grouped_products)
}
- return render(request, "core/index.html", context)
+ return render(request, 'core/index.html', context)
+
+def article_detail(request):
+ # This is a placeholder view to prevent errors
+ return render(request, 'core/article_detail.html')
\ No newline at end of file
diff --git a/static/css/custom.css b/static/css/custom.css
index 925f6ed..1bf8663 100644
--- a/static/css/custom.css
+++ b/static/css/custom.css
@@ -1,4 +1,184 @@
-/* Custom styles for the application */
-body {
- font-family: system-ui, -apple-system, sans-serif;
+:root {
+ --bg-color: #1a1a1a;
+ --sidebar-bg: #262626;
+ --card-bg: #262626;
+ --text-color: #e2e8f0;
+ --text-muted: #94a3b8;
+ --primary-color: #4ade80;
+ --primary-hover: #6ee7b7;
+ --font-heading: 'Poppins', sans-serif;
+ --font-body: 'Inter', sans-serif;
}
+
+body {
+ background-color: var(--bg-color);
+ color: var(--text-color);
+ font-family: var(--font-body);
+ margin: 0;
+ font-size: 16px;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ font-family: var(--font-heading);
+ font-weight: 600;
+}
+
+.pos-container {
+ display: flex;
+ height: 100vh;
+ width: 100%;
+}
+
+.pos-main {
+ flex-grow: 1;
+ padding: 2rem;
+ display: flex;
+ flex-direction: column;
+}
+
+.pos-header {
+ margin-bottom: 2rem;
+}
+
+.product-area {
+ overflow-y: auto;
+ flex-grow: 1;
+ padding-right: 1rem; /* for scrollbar */
+}
+
+.category-title {
+ color: var(--primary-color);
+ font-size: 1.8rem;
+ font-weight: 700;
+ margin-bottom: 1.5rem;
+ margin-top: 2rem;
+ border-bottom: 2px solid var(--primary-color);
+ padding-bottom: 0.5rem;
+ display: inline-block;
+}
+
+.product-grid {
+ display: grid;
+ grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
+ gap: 1.75rem;
+}
+
+.product-card {
+ background-color: var(--card-bg);
+ border-radius: 12px;
+ border: 1px solid #374151;
+ color: var(--text-color);
+ cursor: pointer;
+ transition: transform 0.3s ease, box-shadow 0.3s ease;
+ padding: 1.5rem 1rem;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ text-align: center;
+ box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
+}
+
+.product-card:hover {
+ transform: translateY(-8px);
+ border-color: var(--primary-color);
+ box-shadow: 0 10px 15px -3px rgba(88, 204, 128, 0.4), 0 4px 6px -2px rgba(88, 204, 128, 0.1);
+}
+
+.product-card-title {
+ font-size: 1.1rem;
+ font-weight: 600;
+ margin-bottom: 0.5rem;
+}
+
+.product-card-price {
+ font-size: 1.25rem;
+ font-weight: 700;
+ color: var(--primary-color);
+ margin: 0;
+}
+
+
+.pos-sidebar {
+ width: 380px;
+ min-width: 380px;
+ background-color: var(--sidebar-bg);
+ padding: 2rem;
+ display: flex;
+ flex-direction: column;
+}
+
+.cart {
+ display: flex;
+ flex-direction: column;
+ height: 100%;
+}
+
+.cart-title {
+ color: var(--text-color);
+ border-bottom: 1px solid #475569;
+ padding-bottom: 1rem;
+ margin-bottom: 1rem;
+}
+
+.cart-items {
+ flex-grow: 1;
+ overflow-y: auto;
+}
+
+.cart-summary {
+ border-top: 1px solid #475569;
+ padding-top: 1rem;
+ margin-top: 1rem;
+}
+
+.summary-row {
+ display: flex;
+ justify-content: space-between;
+ font-size: 1rem;
+ margin-bottom: 0.75rem;
+}
+
+.summary-row.total {
+ font-size: 1.25rem;
+ font-weight: 700;
+ color: var(--primary-color);
+}
+
+.btn-primary {
+ background-color: var(--primary-color);
+ border-color: var(--primary-color);
+ color: var(--bg-color);
+ font-weight: 700;
+ padding: 0.75rem 1rem;
+ transition: background-color 0.2s ease;
+}
+
+.btn-primary:hover {
+ background-color: var(--primary-hover);
+ border-color: var(--primary-hover);
+ color: var(--bg-color);
+}
+
+.btn-secondary {
+ background-color: var(--card-bg);
+ border-color: var(--text-muted);
+ color: var(--text-color);
+}
+
+/* Scrollbar */
+::-webkit-scrollbar {
+ width: 8px;
+}
+
+::-webkit-scrollbar-track {
+ background: var(--bg-color);
+}
+
+::-webkit-scrollbar-thumb {
+ background: #475569;
+ border-radius: 4px;
+}
+
+::-webkit-scrollbar-thumb:hover {
+ background: var(--text-muted);
+}
\ No newline at end of file