Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Merge branch 'master' into publicationdate

k-brk16a7f871f3e4
diff --cc saleor/graphql/product/mutations/products.py
index 74eeda8b4f,301514b42c..acaf49c120
--- a/saleor/graphql/product/mutations/products.py
+++ b/saleor/graphql/product/mutations/products.py
@@@ -109,9 -111,9 +111,11 @@@ class CollectionInput(graphene.InputObj
slug = graphene.String(description='Slug of the collection.')
description = graphene.String(description='Description of the collection.')
background_image = Upload(description='Background image file.')
+ background_image_alt = graphene.String(
+ description='Alt text for an image.')
seo = SeoInput(description='Search engine optimization fields.')
+ published_date = graphene.Date(
+ description='Publication date. ISO 8601 standard.')
class CollectionCreateInput(CollectionInput):
diff --cc saleor/graphql/schema.graphql
index ccb8c2cafa,487a9508e8..9ce517e896
--- a/saleor/graphql/schema.graphql
+++ b/saleor/graphql/schema.graphql
@@@ -405,10 -406,9 +406,10 @@@ type Collection implements Node
name: String!
slug: String!
products(before: String, after: String, first: Int, last: Int): ProductCountableConnection
- backgroundImage: Image
+ backgroundImage(size: Int): Image
isPublished: Boolean!
description: String!
+ publishedDate: Date
}
type CollectionAddProducts {
@@@ -438,8 -438,8 +439,9 @@@ input CollectionCreateInput
slug: String
description: String
backgroundImage: Upload
+ backgroundImageAlt: String
seo: SeoInput
+ publishedDate: Date
products: [ID]
}
@@@ -454,8 -454,8 +456,9 @@@ input CollectionInput
slug: String
description: String
backgroundImage: Upload
+ backgroundImageAlt: String
seo: SeoInput
+ publishedDate: Date
}
type CollectionRemoveProducts {
diff --cc saleor/product/models.py
index aa19fafe19,8ad835061e..e7b4d4fafe
--- a/saleor/product/models.py
+++ b/saleor/product/models.py
@@@ -455,9 -451,10 +454,10 @@@ class Collection(SeoModel)
Product, blank=True, related_name='collections')
background_image = VersatileImageField(
upload_to='collection-backgrounds', blank=True, null=True)
+ background_image_alt = models.CharField(max_length=128, blank=True)
is_published = models.BooleanField(default=False)
description = models.TextField(blank=True)
-
+ published_date = models.DateField(blank=True, null=True)
objects = CollectionQuerySet.as_manager()
translated = TranslationProxy()