Refactor email system and add contact form backend

Refactored email sending to use a single HTML template with a base layout, removed plain text email templates, and updated all related backend logic. Introduced a new ContactMe model, serializer, Celery task, and API endpoints for handling contact form submissions, including email notifications. Renamed ShopConfiguration to SiteConfiguration throughout the backend for consistency. Updated frontend to remove unused components, add a new Services section, and adjust navigation and contact form integration.
This commit is contained in:
2025-12-12 01:52:41 +01:00
parent df83288591
commit 564418501c
34 changed files with 433 additions and 327 deletions

View File

@@ -6,14 +6,13 @@ class ConfigurationConfig(AppConfig):
name = 'configuration'
def ready(self):
"""Ensure the ShopConfiguration singleton exists at startup.
"""Ensure the SiteConfiguration singleton exists at startup.
Wrapped in broad DB error handling so that commands like
makemigrations/migrate don't fail when the table does not yet exist.
"""
try:
from .models import ShopConfiguration # local import to avoid premature app registry access
ShopConfiguration.get_solo() # creates if missing
from .models import SiteConfiguration # local import to avoid premature app registry access
SiteConfiguration.get_solo() # creates if missing
except (OperationalError, ProgrammingError):
# DB not ready (e.g., before initial migrate); ignore silently