Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add description to Collection's forms and templates
fowczarek7b8553f54fec
diff --git a/saleor/dashboard/collection/forms.py b/saleor/dashboard/collection/forms.pyindex 7a9b36a772..149e2cfde1 100644--- a/saleor/dashboard/collection/forms.py+++ b/saleor/dashboard/collection/forms.py@@ -23,17 +23,21 @@ class CollectionForm(forms.ModelForm):labels = {'name': pgettext_lazy('Item name', 'Name'),'background_image': pgettext_lazy(- 'Products selection',+ 'Background Image of collection','Background Image'),'is_published': pgettext_lazy('Collection published toggle',- 'Published')}+ 'Published'),+ 'description': pgettext_lazy(+ 'Description of collection',+ 'Description')}def __init__(self, *args, **kwargs):super().__init__(*args, **kwargs)if self.instance.pk:self.fields['products'].set_initial(self.instance.products.all())- self.fields['seo_description'] = SeoDescriptionField()+ self.fields['seo_description'] = SeoDescriptionField(+ extra_attrs={'data-bind': self['description'].auto_id})self.fields['seo_title'] = SeoTitleField(extra_attrs={'data-bind': self['name'].auto_id})diff --git a/templates/dashboard/collection/detail.html b/templates/dashboard/collection/detail.htmlindex ca7443b0b9..771afcb1a8 100644--- a/templates/dashboard/collection/detail.html+++ b/templates/dashboard/collection/detail.html@@ -54,6 +54,9 @@<div class="row">{{ form.products|materializecss }}</div>+ <div class="row">+ {{ form.description|materializecss }}+ </div><div class="row">{{ form.background_image|materializecss }}</div>