Refactored the Zasilkovna SOAP client to use a singleton pattern with caching and lazy loading, improving reliability and startup performance. Updated invoice PDF generation to import WeasyPrint lazily, preventing startup failures on systems missing dependencies. Cleaned up unused imports and code in several frontend components, removed unused state and variables, and adjusted Docker frontend port mapping. Also updated Django migration files to reflect a new generation timestamp.
44 lines
2.7 KiB
Python
44 lines
2.7 KiB
Python
# Generated by Django 5.2.7 on 2025-12-18 15:11
|
|
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='SiteConfiguration',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('name', models.CharField(default='Shop name', max_length=100, unique=True)),
|
|
('logo', models.ImageField(blank=True, null=True, upload_to='shop_logos/')),
|
|
('favicon', models.ImageField(blank=True, null=True, upload_to='shop_favicons/')),
|
|
('contact_email', models.EmailField(blank=True, max_length=254, null=True)),
|
|
('contact_phone', models.CharField(blank=True, max_length=20, null=True)),
|
|
('contact_address', models.TextField(blank=True, null=True)),
|
|
('opening_hours', models.JSONField(blank=True, null=True)),
|
|
('facebook_url', models.URLField(blank=True, null=True)),
|
|
('instagram_url', models.URLField(blank=True, null=True)),
|
|
('youtube_url', models.URLField(blank=True, null=True)),
|
|
('tiktok_url', models.URLField(blank=True, null=True)),
|
|
('whatsapp_number', models.CharField(blank=True, max_length=20, null=True)),
|
|
('zasilkovna_shipping_price', models.DecimalField(decimal_places=2, default=50, max_digits=10)),
|
|
('zasilkovna_api_key', models.CharField(blank=True, help_text='API klíč pro přístup k Zásilkovna API (zatím není využito)', max_length=255, null=True)),
|
|
('zasilkovna_api_password', models.CharField(blank=True, help_text='API heslo pro přístup k Zásilkovna API (zatím není využito)', max_length=255, null=True)),
|
|
('free_shipping_over', models.DecimalField(decimal_places=2, default=2000, max_digits=10)),
|
|
('multiplying_coupons', models.BooleanField(default=True, help_text='Násobení kupónů v objednávce (ano/ne), pokud ne tak se použije pouze nejvyšší slevový kupón')),
|
|
('addition_of_coupons_amount', models.BooleanField(default=False, help_text='Sčítání slevových kupónů v objednávce (ano/ne), pokud ne tak se použije pouze nejvyšší slevový kupón')),
|
|
('currency', models.CharField(choices=[('CZK', 'cz#Czech Koruna'), ('EUR', 'cz#Euro')], default='CZK', max_length=10)),
|
|
],
|
|
options={
|
|
'verbose_name': 'Shop Configuration',
|
|
'verbose_name_plural': 'Shop Configuration',
|
|
},
|
|
),
|
|
]
|