upgrade djangocms-picture 2.0.6 to 2.1.3
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"installed-apps": [
|
||||
"djangocms_picture"
|
||||
],
|
||||
],
|
||||
"package-name": "djangocms-picture"
|
||||
}
|
||||
@@ -24,6 +24,15 @@ class Form(forms.BaseForm):
|
||||
required=False,
|
||||
initial=False,
|
||||
)
|
||||
responsive_images = forms.CheckboxField(
|
||||
'Enable responsive images technique',
|
||||
required=False,
|
||||
initial=False,
|
||||
)
|
||||
responsive_images_viewport_breakpoints = forms.CharField(
|
||||
'List of viewport breakpoints (in pixels) for responsive images (comma separated)',
|
||||
required=False,
|
||||
)
|
||||
|
||||
def clean(self):
|
||||
data = super(Form, self).clean()
|
||||
@@ -36,8 +45,9 @@ class Form(forms.BaseForm):
|
||||
data['alignment'] = ', '.join(data['alignment'])
|
||||
|
||||
# prettify
|
||||
data['templates'] = ', '.join(split_and_strip(data['templates']))
|
||||
data['alignment'] = ', '.join(split_and_strip(data['alignment']))
|
||||
for field in ('templates', 'alignment', 'responsive_images_viewport_breakpoints'):
|
||||
data[field] = ', '.join(split_and_strip(data[field]))
|
||||
|
||||
return data
|
||||
|
||||
def to_settings(self, data, settings):
|
||||
@@ -56,4 +66,9 @@ class Form(forms.BaseForm):
|
||||
if data['nesting']:
|
||||
settings['DJANGOCMS_PICTURE_NESTING'] = data['nesting']
|
||||
|
||||
settings['DJANGOCMS_PICTURE_RESPONSIVE_IMAGES'] = data.get('responsive_images', False)
|
||||
breakpoints = data.get('responsive_images_viewport_breakpoints')
|
||||
if breakpoints:
|
||||
breakpoints = [float(x) for x in split_and_strip(breakpoints)]
|
||||
settings['DJANGOCMS_PICTURE_RESPONSIVE_IMAGES_VIEWPORT_BREAKPOINTS'] = breakpoints
|
||||
return settings
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{
|
||||
"alignment": "",
|
||||
"nesting": false,
|
||||
"ratio": "",
|
||||
"alignment": "",
|
||||
"nesting": false,
|
||||
"ratio": "",
|
||||
"responsive_images": false,
|
||||
"responsive_images_viewport_breakpoints": "",
|
||||
"templates": ""
|
||||
}
|
||||
@@ -7,7 +7,7 @@ https://control.divio.com/api/v1/apps/serve/aldryn-forms/4.0.1/099d84c4-390a-4c5
|
||||
https://control.divio.com/api/v1/apps/serve/aldryn-haystack/0.5.1/bf04cc01-9855-4659-843e-05379cec9ac6/aldryn-haystack-0.5.1.tar.gz#egg=aldryn-haystack==0.5.1
|
||||
https://control.divio.com/api/v1/apps/serve/djangocms-history/0.5.3/05803675-6e8d-4637-b14b-1bb8d18b24b3/djangocms-history-0.5.3.tar.gz#egg=djangocms-history==0.5.3
|
||||
https://control.divio.com/api/v1/apps/serve/djangocms-link/2.1.2/35b986c1-fafb-46ee-b665-aa36603f233a/djangocms-link-2.1.2.tar.gz#egg=djangocms-link==2.1.2
|
||||
https://control.divio.com/api/v1/apps/serve/djangocms-picture/2.0.6/005e8663-d1cc-4667-936c-30709edad076/djangocms-picture-2.0.6.tar.gz#egg=djangocms-picture==2.0.6
|
||||
https://control.divio.com/api/v1/apps/serve/djangocms-picture/2.1.3/ba08d3d9-6bdb-4e48-b8c5-8b70f762685e/djangocms-picture-2.1.3.tar.gz#egg=djangocms-picture==2.1.3
|
||||
https://control.divio.com/api/v1/apps/serve/djangocms-text-ckeditor/3.7.0/a61a9c3c-a1a5-41aa-b996-8e5451701b5b/djangocms-text-ckeditor-3.7.0.tar.gz#egg=djangocms-text-ckeditor==3.7.0
|
||||
https://control.divio.com/api/v1/apps/serve/django-filer/1.4.1/e7e860ea-0af6-4fc8-95e1-ad2580ba0bac/django-filer-1.4.1.tar.gz#egg=django-filer==1.4.1
|
||||
# </INSTALLED_ADDONS>
|
||||
|
||||
Reference in New Issue
Block a user