Major refactor of commerce and Stripe integration
Refactored commerce models to support refunds, invoices, and improved carrier/payment logic. Added new serializers and viewsets for products, categories, images, discount codes, and refunds. Introduced Stripe client integration and removed legacy Stripe admin/model code. Updated Dockerfile for PDF generation dependencies. Removed obsolete migration files and updated configuration app initialization. Added invoice template and tasks for order cleanup.
This commit is contained in:
@@ -13,7 +13,7 @@ from channels.routing import ProtocolTypeRouter, URLRouter
|
||||
from channels.auth import AuthMiddlewareStack
|
||||
#import myapp.routing # your app's routing
|
||||
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'trznice.settings')
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'vontor_cz.settings')
|
||||
|
||||
application = ProtocolTypeRouter({
|
||||
"http": get_asgi_application(),
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import os
|
||||
from celery import Celery
|
||||
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "backend.settings")
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "vontor_cz.settings")
|
||||
|
||||
app = Celery("backend")
|
||||
app = Celery("vontor_cz")
|
||||
app.config_from_object("django.conf:settings", namespace="CELERY")
|
||||
app.autodiscover_tasks()
|
||||
|
||||
@@ -51,12 +51,13 @@ DATETIME_INPUT_FORMATS = [
|
||||
"%Y-%m-%dT%H:%M:%S", # '2025-07-25T14:30:59'
|
||||
]
|
||||
|
||||
LANGUAGE_CODE = 'cs'
|
||||
# -------------------- LOKALIZACE -------------------------
|
||||
|
||||
TIME_ZONE = 'Europe/Prague'
|
||||
LANGUAGE_CODE = os.getenv("LANGUAGE_CODE", "cs")
|
||||
TIME_ZONE = os.getenv("TIME_ZONE", "Europe/Prague")
|
||||
|
||||
USE_I18N = True
|
||||
|
||||
USE_L10N = True
|
||||
USE_TZ = True
|
||||
|
||||
|
||||
@@ -313,6 +314,10 @@ REST_FRAMEWORK = {
|
||||
'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema',
|
||||
'DEFAULT_FILTER_BACKENDS': ['django_filters.rest_framework.DjangoFilterBackend'],
|
||||
|
||||
# Enable default pagination so custom list actions (e.g., /orders/detail) paginate
|
||||
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
|
||||
'PAGE_SIZE': 20,
|
||||
|
||||
'DEFAULT_THROTTLE_RATES': {
|
||||
'anon': '100/hour', # unauthenticated
|
||||
'user': '2000/hour', # authenticated
|
||||
@@ -326,7 +331,8 @@ REST_FRAMEWORK = {
|
||||
MY_CREATED_APPS = [
|
||||
'account',
|
||||
'commerce',
|
||||
|
||||
'configuration',
|
||||
|
||||
'social.chat',
|
||||
|
||||
'thirdparty.downloader',
|
||||
|
||||
@@ -39,4 +39,5 @@ urlpatterns = [
|
||||
path('api/trading212/', include('thirdparty.trading212.urls')),
|
||||
path('api/downloader/', include('thirdparty.downloader.urls')),
|
||||
path("api/payments/gopay/", include("thirdparty.gopay.urls", namespace="gopay")),
|
||||
path('api/zasilkovna/', include('thirdparty.zasilkovna.urls')),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user