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:
7
backend/thirdparty/zasilkovna/client.py
vendored
7
backend/thirdparty/zasilkovna/client.py
vendored
@@ -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 ----------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user