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:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user