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

@@ -26,7 +26,7 @@ from rest_framework.exceptions import ValidationError
from .client import PacketaAPI
from configuration.models import ShopConfiguration
from configuration.models import SiteConfiguration
packeta_client = PacketaAPI() # single reusable instance
@@ -103,8 +103,8 @@ class ZasilkovnaPacket(models.Model):
cod=order.total_price if cash_on_delivery else 0, # dobírka
value=order.total_price,
currency=ShopConfiguration.get_solo().currency, #CZK
eshop= ShopConfiguration.get_solo().name,
currency=SiteConfiguration.get_solo().currency, #CZK
eSite= SiteConfiguration.get_solo().name,
)
self.packet_id = response['packet_id']
self.barcode = response['barcode']