comfy/artel/store/management/commands/load_products.py

14 wiersze
361 B
Python
Czysty Zwykły widok Historia

2023-07-26 00:00:35 +00:00
from django.core.management import BaseCommand
from django.conf import settings
from store.loader import ProductLoader
class Command(BaseCommand):
help = "Load products from csv file"
def handle(self, *args, **options):
2023-08-10 20:24:48 +00:00
loader = ProductLoader(settings.PRODUCTS_CSV_PATH, ["mocowanie", "format", "wykonanie"], True)
2023-07-26 00:00:35 +00:00
loader.process()