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 @@ -
- -Expert legal support for barristers specializing in defamation law.
+ Submit a New Case +Submit the details of a potential new case for review.
+ +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" }}
-