Refactor order creation and add configuration endpoints

Refactored order creation logic to use new serializers and transaction handling, improving validation and modularity. Introduced admin and public endpoints for shop configuration with sensitive fields protected. Enhanced Zásilkovna (Packeta) integration, including packet widget template, new API fields, and improved error handling. Added django-silk for profiling, updated requirements and settings, and improved frontend Orval config for API client generation.
This commit is contained in:
David Bruno Vontor
2025-12-08 18:19:20 +01:00
parent 5b066e2770
commit 946f86db7e
18 changed files with 606 additions and 309 deletions

View File

@@ -15,11 +15,14 @@ zeepZasClient = Client(wsdl=WSDL_URL)
class PacketaAPI:
#TODO: zeptat se jestli nepřidat další checkovací parametry ohledně zásilkovny např: blokování podle nastavení webu
#TODO: zeptat se jestli nepřidat další checkovací parametry ohledně zásilkovny např: blokování podle configurace webu
# popřemýšlet, jestli api klíče nenastavit přes configurator webu
def __getattribute__(self):
if PACKETA_API_PASSWORD is None:
if PACKETA_API_PASSWORD in [None, ""]:
raise Exception("Packeta API password is not set in environment variables.")
elif zeepZasClient is None:
raise Exception("Packeta SOAP client is not initialized.")
# ---------- CREATE PACKET METHODS ----------