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

14 wiersze
361 B
Python

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):
loader = ProductLoader(settings.PRODUCTS_CSV_PATH, ["mocowanie", "format", "wykonanie"], True)
loader.process()