diff --git a/config/__pycache__/settings.cpython-311.pyc b/config/__pycache__/settings.cpython-311.pyc index 5be02db..ded4401 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..c1561e9 100644 --- a/config/settings.py +++ b/config/settings.py @@ -21,6 +21,7 @@ SECRET_KEY = os.getenv("DJANGO_SECRET_KEY", "change-me") DEBUG = os.getenv("DJANGO_DEBUG", "true").lower() == "true" ALLOWED_HOSTS = [ + "*", "127.0.0.1", "localhost", os.getenv("HOST_FQDN", ""), diff --git a/core/__pycache__/admin.cpython-311.pyc b/core/__pycache__/admin.cpython-311.pyc index cd6f855..01cd24e 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 9aa598b..69dc2e3 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..ff4e8b5 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..fb5e17e 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..ac3f1a9 100644 --- a/core/admin.py +++ b/core/admin.py @@ -1,3 +1,13 @@ from django.contrib import admin +from .models import Client, Brand -# Register your models here. +@admin.register(Client) +class ClientAdmin(admin.ModelAdmin): + list_display = ('name', 'created_at', 'updated_at') + search_fields = ('name',) + +@admin.register(Brand) +class BrandAdmin(admin.ModelAdmin): + list_display = ('name', 'client', 'created_at', 'updated_at') + search_fields = ('name', 'client__name') + list_filter = ('client',) \ 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..f90de70 --- /dev/null +++ b/core/migrations/0001_initial.py @@ -0,0 +1,34 @@ +# Generated by Django 5.2.7 on 2025-12-18 10:27 + +import django.db.models.deletion +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Client', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=255, unique=True)), + ('created_at', models.DateTimeField(auto_now_add=True)), + ('updated_at', models.DateTimeField(auto_now=True)), + ], + ), + migrations.CreateModel( + name='Brand', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=255)), + ('created_at', models.DateTimeField(auto_now_add=True)), + ('updated_at', models.DateTimeField(auto_now=True)), + ('client', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='brands', to='core.client')), + ], + ), + ] 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..cff3beb 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..13b7021 100644 --- a/core/models.py +++ b/core/models.py @@ -1,3 +1,18 @@ from django.db import models -# Create your models here. +class Client(models.Model): + name = models.CharField(max_length=255, unique=True) + created_at = models.DateTimeField(auto_now_add=True) + updated_at = models.DateTimeField(auto_now=True) + + def __str__(self): + return self.name + +class Brand(models.Model): + name = models.CharField(max_length=255) + client = models.ForeignKey(Client, on_delete=models.CASCADE, related_name='brands') + created_at = models.DateTimeField(auto_now_add=True) + updated_at = models.DateTimeField(auto_now=True) + + def __str__(self): + return self.name diff --git a/core/templates/base.html b/core/templates/base.html index 1e7e5fb..9171129 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -3,7 +3,8 @@ - {% block title %}Knowledge Base{% endblock %} + + {% block title %}Marketing Collaboration Platform{% endblock %} {% if project_description %} @@ -13,13 +14,23 @@ {% endif %} + + + + + + + {% load static %} {% block head %}{% endblock %} - {% block content %}{% endblock %} +
+ {% block content %}{% endblock %} +
+ diff --git a/core/templates/core/index.html b/core/templates/core/index.html index faec813..35e667d 100644 --- a/core/templates/core/index.html +++ b/core/templates/core/index.html @@ -1,145 +1,99 @@ -{% extends "base.html" %} +{% extends 'base.html' %} +{% load static %} -{% block title %}{{ project_name }}{% endblock %} +{% block title %}Marketing Collaboration Platform{% endblock %} {% block head %} - - - {% endblock %} {% block content %} -
-
-

Analyzing your requirements and generating your app…

-
- Loading… +
+

Marketing Collaboration, Simplified.

+

The central hub for your clients, brands, campaigns, and creative assets.

+ +
+ +
+

Clients

+
+ {% for client in clients %} +
+
+
+
{{ client.name }}
+ +
+
    + {% for brand in client.brands.all %} +
  • {{ brand.name }}
  • + {% empty %} +
  • No brands yet.
  • + {% endfor %} +
+
+
+ + + + {% endfor %}
-

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 + + + + +{% endblock %} diff --git a/core/urls.py b/core/urls.py index 6299e3d..332eff0 100644 --- a/core/urls.py +++ b/core/urls.py @@ -1,7 +1,9 @@ from django.urls import path -from .views import home +from django.urls import path + +from .views import index urlpatterns = [ - path("", home, name="home"), + path("", index, name="index"), ] diff --git a/core/views.py b/core/views.py index c9aed12..b53cdf1 100644 --- a/core/views.py +++ b/core/views.py @@ -1,25 +1,24 @@ -import os -import platform +from django.shortcuts import render, redirect +from .models import Client, Brand -from django import get_version as django_version -from django.shortcuts import render -from django.utils import timezone - - -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() +def index(request): + if request.method == 'POST': + if 'client_name' in request.POST: + client_name = request.POST.get('client_name') + if client_name: + Client.objects.create(name=client_name) + return redirect('index') + + if 'brand_name' in request.POST and 'client_id' in request.POST: + brand_name = request.POST.get('brand_name') + client_id = request.POST.get('client_id') + if brand_name and client_id: + client = Client.objects.get(id=client_id) + Brand.objects.create(name=brand_name, client=client) + return redirect('index') + clients = Client.objects.prefetch_related('brands').all().order_by('-created_at') 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", ""), + 'clients': clients, } - 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..1848ed7 100644 --- a/static/css/custom.css +++ b/static/css/custom.css @@ -1,4 +1,29 @@ -/* Custom styles for the application */ -body { - font-family: system-ui, -apple-system, sans-serif; +:root { + --primary-color: #4F46E5; + --secondary-color: #F3F4F6; + --success-color: #10B981; + --text-color: #212529; + --font-family-headings: 'Poppins', sans-serif; + --font-family-body: 'Inter', sans-serif; } + +body { + font-family: var(--font-family-body); + color: var(--text-color); + background-color: #FFF; +} + +h1, h2, h3, h4, h5, h6 { + font-family: var(--font-family-headings); + font-weight: 700; +} + +.btn-primary { + background-color: var(--primary-color); + border-color: var(--primary-color); +} + +.btn-primary:hover { + background-color: #4338CA; + border-color: #4338CA; +} \ No newline at end of file diff --git a/staticfiles/css/custom.css b/staticfiles/css/custom.css index 108056f..1848ed7 100644 --- a/staticfiles/css/custom.css +++ b/staticfiles/css/custom.css @@ -1,21 +1,29 @@ - :root { - --bg-color-start: #6a11cb; - --bg-color-end: #2575fc; - --text-color: #ffffff; - --card-bg-color: rgba(255, 255, 255, 0.01); - --card-border-color: rgba(255, 255, 255, 0.1); + --primary-color: #4F46E5; + --secondary-color: #F3F4F6; + --success-color: #10B981; + --text-color: #212529; + --font-family-headings: 'Poppins', sans-serif; + --font-family-body: 'Inter', sans-serif; } + body { - margin: 0; - font-family: 'Inter', sans-serif; - background: linear-gradient(45deg, var(--bg-color-start), var(--bg-color-end)); + font-family: var(--font-family-body); color: var(--text-color); - display: flex; - justify-content: center; - align-items: center; - min-height: 100vh; - text-align: center; - overflow: hidden; - position: relative; + background-color: #FFF; } + +h1, h2, h3, h4, h5, h6 { + font-family: var(--font-family-headings); + font-weight: 700; +} + +.btn-primary { + background-color: var(--primary-color); + border-color: var(--primary-color); +} + +.btn-primary:hover { + background-color: #4338CA; + border-color: #4338CA; +} \ No newline at end of file