From f1499c50c36754ad8d6a944f05ed0122163f8d85 Mon Sep 17 00:00:00 2001 From: Thomas Fillon Date: Thu, 24 Sep 2015 11:58:13 +0200 Subject: [PATCH] Update populate_db management command --- app/records/management/commands/populate_db.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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)) -- 2.39.5