diff --git a/core/__pycache__/admin.cpython-311.pyc b/core/__pycache__/admin.cpython-311.pyc index cd6f855..9ee41bb 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..8dfa0b8 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..b7a5ea1 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..2c2f004 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..515d673 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..c381fcd 100644 --- a/core/admin.py +++ b/core/admin.py @@ -1,3 +1,9 @@ from django.contrib import admin +from .models import Case -# Register your models here. +@admin.register(Case) +class CaseAdmin(admin.ModelAdmin): + list_display = ('full_name', 'email', 'submitted_at', 'status') + list_filter = ('status', 'submitted_at') + search_fields = ('full_name', 'email', 'description') + readonly_fields = ('submitted_at',) diff --git a/core/forms.py b/core/forms.py new file mode 100644 index 0000000..b3bfc92 --- /dev/null +++ b/core/forms.py @@ -0,0 +1,13 @@ +from django import forms +from .models import Case + +class IntakeForm(forms.ModelForm): + class Meta: + model = Case + fields = ['full_name', 'email', 'phone_number', 'description'] + widgets = { + 'full_name': forms.TextInput(attrs={'class': 'form-control'}), + 'email': forms.EmailInput(attrs={'class': 'form-control'}), + 'phone_number': forms.TextInput(attrs={'class': 'form-control'}), + 'description': forms.Textarea(attrs={'class': 'form-control', 'rows': 5}), + } diff --git a/core/models.py b/core/models.py index 71a8362..3f25891 100644 --- a/core/models.py +++ b/core/models.py @@ -1,3 +1,12 @@ from django.db import models -# Create your models here. +class Case(models.Model): + full_name = models.CharField(max_length=255) + email = models.EmailField() + phone_number = models.CharField(max_length=20, blank=True) + description = models.TextField() + submitted_at = models.DateTimeField(auto_now_add=True) + status = models.CharField(max_length=20, choices=[('new', 'New'), ('in_review', 'In Review'), ('closed', 'Closed')], default='new') + + def __str__(self): + return f"Case for {self.full_name} submitted at {self.submitted_at.strftime('%Y-%m-%d %H:%M')}" \ No newline at end of file diff --git a/core/templates/base.html b/core/templates/base.html index 1e7e5fb..e979792 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -1,25 +1,20 @@ - - - {% block title %}Knowledge Base{% endblock %} - {% if project_description %} - - - - {% endif %} - {% if project_image_url %} - - - {% endif %} - {% load static %} - - {% block head %}{% endblock %} + + + {% block title %}Defamation Assist{% endblock %} + + + + + {% load static %} + - - {% block content %}{% endblock %} +
+ {% block content %}{% endblock %} +
+ - diff --git a/core/templates/core/index.html b/core/templates/core/index.html index faec813..b322947 100644 --- a/core/templates/core/index.html +++ b/core/templates/core/index.html @@ -1,145 +1,51 @@ -{% extends "base.html" %} +{% extends 'base.html' %} -{% block title %}{{ project_name }}{% endblock %} - -{% block head %} - - - - -{% endblock %} +{% block title %}Defamation Assist - Your Expert Legal Partner{% endblock %} {% block content %} -
-
-

Analyzing your requirements and generating your app…

-
- Loading… +
+

Defamation Assist

+

Expert legal support for barristers specializing in defamation law.

+ Submit a New Case +
+ +
+
+
+
+

Client Intake Form

+

Submit the details of a potential new case for review.

+
+ {% csrf_token %} +
+ {{ form.full_name.label_tag }} + {{ form.full_name }} +
+
+
+ {{ form.email.label_tag }} + {{ form.email }} +
+
+ {{ form.phone_number.label_tag }} + {{ form.phone_number }} +
+
+
+ {{ form.description.label_tag }} + {{ form.description }} +
+ {% if form.errors %} +
+ Please correct the errors below. +
+ {% endif %} +
+ +
+
+
+
-

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/templates/core/success.html b/core/templates/core/success.html new file mode 100644 index 0000000..843d01c --- /dev/null +++ b/core/templates/core/success.html @@ -0,0 +1,15 @@ +{% extends 'base.html' %} + +{% block title %}Submission Successful - Defamation Assist{% endblock %} + +{% block content %} +
+
+

Thank You!

+

Your case information has been submitted successfully.

+

A member of our team will review the details and contact you shortly.

+
+ Return to Homepage +
+
+{% endblock %} diff --git a/core/urls.py b/core/urls.py index 6299e3d..d183562 100644 --- a/core/urls.py +++ b/core/urls.py @@ -1,7 +1,7 @@ from django.urls import path - -from .views import home +from .views import index, intake_success urlpatterns = [ - path("", home, name="home"), -] + path('', index, name='index'), + path('success/', intake_success, name='intake_success'), +] \ No newline at end of file diff --git a/core/views.py b/core/views.py index c9aed12..11ffc5a 100644 --- a/core/views.py +++ b/core/views.py @@ -2,24 +2,18 @@ import os import platform from django import get_version as django_version -from django.shortcuts import render -from django.utils import timezone +from django.shortcuts import render, redirect +from .forms import IntakeForm +def index(request): + if request.method == 'POST': + form = IntakeForm(request.POST) + if form.is_valid(): + form.save() + return redirect('intake_success') + else: + form = IntakeForm() + return render(request, 'core/index.html', {'form': form}) -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() - - 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", ""), - } - return render(request, "core/index.html", context) +def intake_success(request): + return render(request, 'core/success.html') diff --git a/static/css/custom.css b/static/css/custom.css index 925f6ed..122eb7d 100644 --- a/static/css/custom.css +++ b/static/css/custom.css @@ -1,4 +1,77 @@ -/* Custom styles for the application */ -body { - font-family: system-ui, -apple-system, sans-serif; +:root { + --primary-color: #0A2342; + --secondary-color: #B0B0B0; + --accent-color: #D4AF37; + --bg-color: #F8F9FA; + --text-color: #212529; + --heading-font: 'Merriweather', serif; + --body-font: 'Lato', sans-serif; } + +body { + font-family: var(--body-font); + background-color: var(--bg-color); + color: var(--text-color); +} + +h1, h2, h3, h4, h5, h6 { + font-family: var(--heading-font); + color: var(--primary-color); +} + +.btn-primary { + background-color: var(--accent-color); + border-color: var(--accent-color); + color: var(--primary-color); + font-weight: bold; +} + +.btn-primary:hover { + background-color: #c5a230; + border-color: #c5a230; + color: var(--primary-color); +} + +.hero { + background-color: var(--primary-color); + color: var(--bg-color); + padding: 6rem 2rem; + text-align: center; +} + +.hero h1 { + font-size: 3.5rem; + font-weight: 700; + color: var(--bg-color); +} + +.hero .lead { + font-size: 1.5rem; + color: var(--secondary-color); + margin-bottom: 2rem; +} + +.intake-section { + padding: 4rem 2rem; +} + +.intake-form { + background: #fff; + padding: 2rem; + border-radius: 8px; + box-shadow: 0 4px 15px rgba(0,0,0,0.1); +} + +.form-control:focus { + border-color: var(--accent-color); + box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.25); +} + +.success-message { + min-height: 80vh; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + text-align: center; +} \ No newline at end of file