Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Update products data
Marcin Gębalaf60df5c9c291
diff --git a/saleor/core/management/commands/populatedb.py b/saleor/core/management/commands/populatedb.pyindex 35b4543da7..a99f371003 100644--- a/saleor/core/management/commands/populatedb.py+++ b/saleor/core/management/commands/populatedb.py@@ -57,6 +57,7 @@ class Command(BaseCommand):self.stdout.write(msg)create_products_by_schema(self.placeholders_dir, create_images, stdout=self.stdout)+ self.stdout.write('Created products')for msg in create_product_sales(5):self.stdout.write(msg)for msg in create_vouchers():diff --git a/saleor/core/utils/random_data.py b/saleor/core/utils/random_data.pyindex 66eb90e568..93f1db91d2 100644--- a/saleor/core/utils/random_data.py+++ b/saleor/core/utils/random_data.py@@ -6,13 +6,11 @@ import unicodedataimport uuidfrom collections import defaultdictfrom datetime import date-from decimal import Decimalfrom unittest.mock import patchfrom django.conf import settingsfrom django.contrib.sites.models import Sitefrom django.core.files import File-from django.template.defaultfilters import slugifyfrom django_countries.fields import Countryfrom faker import Factoryfrom faker.providers import BaseProvider@@ -24,7 +22,6 @@ from ...account.utils import store_user_addressfrom ...checkout import AddressTypefrom ...core.utils.json_serializer import object_hookfrom ...core.utils.taxes import get_tax_rate_by_name, get_taxes_for_country-from ...core.utils.text import strip_html_and_truncatefrom ...core.weight import zero_weightfrom ...dashboard.menu.utils import update_menufrom ...discount import DiscountValueType, VoucherType@@ -33,14 +30,12 @@ from ...menu.models import Menufrom ...order.models import Fulfillment, Orderfrom ...order.utils import update_order_statusfrom ...page.models import Page-from ...payment import ChargeStatus, TransactionKindfrom ...payment.models import Paymentfrom ...payment.utils import get_billing_datafrom ...product.models import (Attribute, AttributeValue, Category, Collection, Product, ProductImage,ProductType, ProductVariant)from ...product.thumbnails import create_product_thumbnails-from ...product.utils.attributes import get_name_from_attributesfrom ...shipping.models import ShippingMethod, ShippingMethodType, ShippingZonefrom ...shipping.utils import get_taxed_shipping_price@@ -89,8 +84,9 @@ IMAGES_MAPPING = {'saleordemoproduct_sneakers_02_2.png','saleordemoproduct_sneakers_02_3.png','saleordemoproduct_sneakers_02_4.png'],- 89:- ['saleordemoproduct_cl_boot07_1.png', 'saleordemoproduct_cl_boot07_2.png'],+ 89: [+ 'saleordemoproduct_cl_boot07_1.png',+ 'saleordemoproduct_cl_boot07_2.png'],107: ['saleordemoproduct_cl_polo01.png'],108: ['saleordemoproduct_cl_polo02.png'],109: ['saleordemoproduct_cl_polo03-woman.png'],@@ -543,13 +539,9 @@ def create_collections_by_schema(placeholder_dir, schema=COLLECTIONS_SCHEMA):def create_page():content = """- <h2 align="center">AN OPENSOURCE STOREFRONT PLATFORM FOR PERFECTIONISTS</h2>- <h3 align="center">WRITTEN IN PYTHON, BEST SERVED AS A BESPOKE, HIGH-PERFORMANCE E-COMMERCE SOLUTION</h3>- <p><br></p>- <p><img src="http://getsaleor.com/images/main-pic.svg"></p>- <p style="text-align: center;">- <a href="https://github.com/mirumee/saleor/">Get Saleor</a> today!- </p>+ <h2>E-commerce for the PWA era</h2>+ <h3>A modular, high performance e-commerce storefront built with GraphQL, Django, and ReactJS.</h3>+ <p>Saleor is a rapidly-growing open source e-commerce platform that has served high-volume companies from branches like publishing and apparel since 2012. Based on Python and Django, the latest major update introduces a modular front end with a GraphQL API and storefront and dashboard written in React to make Saleor a full-functionality open source e-commerce.</p>"""page_data = {'content': content, 'title': 'About', 'is_visible': True}page, dummy = Page.objects.get_or_create(slug='about', **page_data)