From: Thomas Fillon Date: Thu, 24 Sep 2015 09:58:13 +0000 (+0200) Subject: Update populate_db management command X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=f1499c50c36754ad8d6a944f05ed0122163f8d85;p=diggersdigest.git Update populate_db management command --- diff --git a/app/records/management/commands/populate_db.py b/app/records/management/commands/populate_db.py index f063718..eba8137 100644 --- a/app/records/management/commands/populate_db.py +++ b/app/records/management/commands/populate_db.py @@ -477,6 +477,10 @@ class Command(BaseCommand): product.title = record.title product.content = shop.desc + product.slug = '' # If left blank, the main title field will be used. + product.description = '' # Leave blank to have the URL auto-generated from the title. + product.gen_description = True + # Category theme = rec_models.Theme.objects.get(id=shop.theme) category_id = THEME_TO_CATEGORY[theme.pk] @@ -508,7 +512,7 @@ class Command(BaseCommand): product.save() default_variation = product.variations.get(default=True) - default_variation.sku = "DD_REC_" + str(record.pk) + default_variation.sku = "REC_" + str(record.pk) default_variation.save() self.stdout.write('Product %d / %d --> %s' % (product.pk,len(OLD_SHOP_LIST), product.available))