Add a complete contact form system with the following changes: - Create ContactMessage model to store form submissions with tracking fields (is_read, is_responded) - Implement ContactMessage admin interface with custom actions, filters, and bulk operations - Add contact endpoint documentation to API root view - Update email configuration to use admin@attunehearttherapy.com as sender address This enables users to submit contact inquiries and allows administrators to track and manage these messages efficiently through the Django admin panel.
32 lines
1.1 KiB
Python
32 lines
1.1 KiB
Python
# Generated by Django 5.2.8 on 2025-11-28 15:37
|
|
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('users', '0001_initial'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='ContactMessage',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('name', models.CharField(max_length=255)),
|
|
('email', models.EmailField(max_length=254)),
|
|
('phone', models.CharField(blank=True, max_length=20)),
|
|
('message', models.TextField()),
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
('is_read', models.BooleanField(default=False)),
|
|
('is_responded', models.BooleanField(default=False)),
|
|
],
|
|
options={
|
|
'verbose_name': 'Contact Message',
|
|
'verbose_name_plural': 'Contact Messages',
|
|
'ordering': ['-created_at'],
|
|
},
|
|
),
|
|
]
|