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:
@@ -106,6 +106,7 @@ LOGGING = {
|
||||
},
|
||||
}
|
||||
|
||||
# -- PŘÍKLAD POUŽITÍ LOGS --
|
||||
"""
|
||||
import logging
|
||||
|
||||
@@ -120,6 +121,9 @@ logger.error("Chyba – něco se pokazilo, ale aplikace jede dál")
|
||||
logger.critical("Kritická chyba – selhání systému, třeba pád služby")
|
||||
"""
|
||||
|
||||
# -- SILK --
|
||||
SILKY_PYTHON_PROFILER = True
|
||||
|
||||
#---------------------------------- END LOGS ---------------------------------------
|
||||
|
||||
#-------------------------------------SECURITY 🔐------------------------------------
|
||||
@@ -374,6 +378,8 @@ INSTALLED_APPS = [
|
||||
#Nastavení stránky
|
||||
#'constance',
|
||||
#'constance.backends.database',
|
||||
|
||||
'silk',
|
||||
|
||||
'django.contrib.sitemaps',
|
||||
|
||||
@@ -403,6 +409,8 @@ MIDDLEWARE = [
|
||||
|
||||
'whitenoise.middleware.WhiteNoiseMiddleware',
|
||||
|
||||
'silk.middleware.SilkyMiddleware',
|
||||
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
|
||||
@@ -29,12 +29,14 @@ urlpatterns = [
|
||||
path("api/schema/", SpectacularAPIView.as_view(), name="schema"),
|
||||
path("swagger/", SpectacularSwaggerView.as_view(url_name="schema"), name="swagger-ui"),
|
||||
path("redoc/", SpectacularRedocView.as_view(url_name="schema"), name="redoc"),
|
||||
path('silk/', include('silk.urls', namespace='silk')),
|
||||
|
||||
|
||||
path('admin/', admin.site.urls),
|
||||
path("api/choices/", choices, name="choices"),
|
||||
path('api/account/', include('account.urls')),
|
||||
path('api/commerce/', include('commerce.urls')),
|
||||
path('api/configuration/', include('configuration.urls')),
|
||||
#path('api/advertisments/', include('advertisements.urls')),
|
||||
|
||||
path('api/stripe/', include('thirdparty.stripe.urls')),
|
||||
|
||||
Reference in New Issue
Block a user