send_locally_feed.py: take season as argument
This commit is contained in:
@ -13,13 +13,13 @@ from products.models import Product, SeasonRegionMaterial, UPC, ProductImage, Pr
|
||||
class Command(BaseCommand):
|
||||
help = 'Send a product feed to Locally'
|
||||
|
||||
# def add_arguments(self, parser):
|
||||
# parser.add_argument('cat_ids', nargs='+', type=int)
|
||||
|
||||
def add_arguments(self, parser):
|
||||
parser.add_argument('season')
|
||||
|
||||
|
||||
def handle(self, *args, **options):
|
||||
# NOTE: choose the most current season in the db?
|
||||
season = 'FW20'
|
||||
season = options['season']
|
||||
for region in ['US', 'CANADA', 'UTILITY US', 'UTILITY CANADA']:
|
||||
upcs = self.get_upcs(season, region)
|
||||
self.write_csv(self.csv_path(season, region), upcs, season)
|
||||
|
||||
Reference in New Issue
Block a user