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):
|
class Command(BaseCommand):
|
||||||
help = 'Send a product feed to Locally'
|
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):
|
def handle(self, *args, **options):
|
||||||
# NOTE: choose the most current season in the db?
|
season = options['season']
|
||||||
season = 'FW20'
|
|
||||||
for region in ['US', 'CANADA', 'UTILITY US', 'UTILITY CANADA']:
|
for region in ['US', 'CANADA', 'UTILITY US', 'UTILITY CANADA']:
|
||||||
upcs = self.get_upcs(season, region)
|
upcs = self.get_upcs(season, region)
|
||||||
self.write_csv(self.csv_path(season, region), upcs, season)
|
self.write_csv(self.csv_path(season, region), upcs, season)
|
||||||
|
|||||||
Reference in New Issue
Block a user