This Django project provides a web-based customs tax calculator for calculating import taxes on parcels in Ukraine.
- Calculates customs taxes based on the price input.
- Supports both Euro and Dollar currencies with conversion rates.
The SECRET_KEY is used for cryptographic signing in Django and is critical for production security.
Using Django's built-in utility:
from django.core.management.utils import get_random_secret_key
print(get_random_secret_key())Or using Python's secrets module:
import secrets
print(secrets.token_urlsafe(50))docker run -e SECRET_KEY=your_generated_secret_key -p 8000:8000 your_imageThe SECRET_KEY is configured in config/settings.py using the SECRET_KEY environment variable. In DEBUG mode (development), it falls back to an insecure generated key. In production (DEBUG=False), the environment variable is required.
Do not forget to run with --init for SIGTERM to correctly forward to child processes.