Skip to content

Commit e53c3c4

Browse files
authored
added django 1.10 support (divio#132)
1 parent d04ae3e commit e53c3c4

File tree

6 files changed

+35
-48
lines changed

6 files changed

+35
-48
lines changed

CHANGELOG.rst

+17-17
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,7 @@ Changelog
66
1.2.0 (unreleased)
77
==================
88

9-
* Fixed an issue with collapse styles from image plugin overriding bootstrap
10-
styles already on the page
11-
* Fixed an issue with dropzone strings visible inside djangocms-text-ckeditor
12-
image preview under certain circumstances
13-
* Added test framework
14-
* Adapted root files such as ``README``, ``CHANGELOG``, ``setup.py`` and others
15-
to conform with other core addons such as django CMS Picture
16-
* Adapted labels and help texts of several plugins
9+
* Added Django 1.10 support
1710
* Added <code> plugin
1811
* Added <cite> plugin to <blockquote>
1912
* Added responsive plugin to set device and print breakpoints
@@ -23,21 +16,28 @@ Changelog
2316
* Added default CKEditor "styleSet" to load via djangocms-text-ckeditor in
2417
``/static/aldryn_bootstrap3/js/ckeditor.js``
2518
* Added transifex integration for translations
26-
* Added ``ALDRYN_BOOTSTRAP3_GRID_SIZE`` to Divio Cloud settings
27-
* Set all max_values to 255
19+
* Added test framework
20+
* Changed root files such as ``README``, ``CHANGELOG``, ``setup.py`` and others
21+
to conform with other core addons such as django CMS Picture
22+
* Changed labels and help texts of several plugins
23+
* Changed all max_values to 255
24+
* Changed code to reflect Bootstrap 3's documentation
25+
* Fixed an issue with collapse styles from image plugin overriding bootstrap
26+
styles already on the page
27+
* Fixed an issue with dropzone strings visible inside djangocms-text-ckeditor
28+
image preview under certain circumstances
2829
* Fixed an issue where column offset, push and pull did not accept "0" as a value
29-
* Restructured code to reflect Bootstrap 3's documentation
30-
* Simplified and removed constants such as ``LABEL_CONTEXT_CHOICES``,
31-
``LABEL_CONTEXT_DEFAULT``, ,``TEXT_LINK_CONTEXT_CHOICES``,
32-
``TXT_LINK_CONTEXT_DEFAULT``, ``PANEL_CONTEXT_CHOICES``,
33-
``PANEL_CONTEXT_DEFAULT``, ``ACCORDION_ITEM_CONTEXT_CHOICES``,
34-
``ACCORDION_ITEM_CONTEXT_DEFAULT``, ``LIST_GROUP_ITEM_CONTEXT_CHOICES``,
35-
``LIST_GROUP_ITEM_CONTEXT_DEFAULT``
3630
* **Backwards incompatible** changes:
3731
* The Panel only allows header, body and footer now to be its direct
3832
decendands and the descendends require the "Panel" parent.
3933
* Drag & drop support has been removed from the rendered plugin markup
4034
until a cleaner version is ready
35+
* Simplified and removed constants such as ``LABEL_CONTEXT_CHOICES``,
36+
``LABEL_CONTEXT_DEFAULT``, ,``TEXT_LINK_CONTEXT_CHOICES``,
37+
``TXT_LINK_CONTEXT_DEFAULT``, ``PANEL_CONTEXT_CHOICES``,
38+
``PANEL_CONTEXT_DEFAULT``, ``ACCORDION_ITEM_CONTEXT_CHOICES``,
39+
``ACCORDION_ITEM_CONTEXT_DEFAULT``, ``LIST_GROUP_ITEM_CONTEXT_CHOICES``,
40+
``LIST_GROUP_ITEM_CONTEXT_DEFAULT``
4141

4242

4343
1.1.2 (2016-09-05)

README.rst

+7-1
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,17 @@ One of the easiest contributions you can make is helping to translate this addon
3030
Documentation
3131
=============
3232

33-
See ``REQUIREMENTS`` in the `setup.py <https://github.com/divio/aldryn-bootstrap3/blob/master/setup.py>`_
33+
See ``REQUIREMENTS`` in the `setup.py <https://github.com/aldryn/aldryn-bootstrap3/blob/master/setup.py>`_
3434
file for additional dependencies:
3535

3636
* Python 2.7, 3.3 or higher
3737
* Django 1.6 or higher
38+
* Django Filer 1.2.4 or higher
39+
* Django Text CKEditor 3.1.0 or higher
40+
41+
Make sure `django Filer <http://django-filer.readthedocs.io/en/latest/installation.html>`_
42+
and `django CMS Text CKEditor <https://github.com/divio/djangocms-text-ckeditor>`_
43+
are installed and configured appropriately.
3844

3945

4046
Installation

aldryn_bootstrap3/cms_plugins.py

+8-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import json
55
import warnings
66

7-
from django.conf.urls import patterns, url
7+
from django.conf.urls import url
88
from django.core.exceptions import ImproperlyConfigured
99
from django.http import HttpResponse
1010
from django.templatetags.static import static
@@ -310,11 +310,13 @@ def icon_src(self, instance):
310310
return ''
311311

312312
def get_plugin_urls(self):
313-
urlpatterns = patterns(
314-
'',
315-
url(r'^ajax_upload/(?P<pk>[0-9]+)/$', self.ajax_upload,
316-
name='bootstrap3_image_ajax_upload'),
317-
)
313+
urlpatterns = [
314+
url(
315+
r'^ajax_upload/(?P<pk>[0-9]+)/$',
316+
self.ajax_upload,
317+
name='bootstrap3_image_ajax_upload'
318+
),
319+
]
318320
return urlpatterns
319321

320322
@csrf_exempt

aldryn_bootstrap3/model_fields.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -192,15 +192,15 @@ def clean(self):
192192
)
193193

194194
anchor_field_verbose_name = force_text(
195-
self._meta.get_field_by_name(anchor_field_name)[0].verbose_name)
195+
self._meta.get_field(anchor_field_name).verbose_name)
196196
anchor_field_value = getattr(self, anchor_field_name)
197197

198198
link_fields = {
199199
key: getattr(self, key)
200200
for key in field_names
201201
}
202202
link_field_verbose_names = {
203-
key: force_text(self._meta.get_field_by_name(key)[0].verbose_name)
203+
key: force_text(self._meta.get_field(key).verbose_name)
204204
for key in link_fields.keys()
205205
}
206206
provided_link_fields = {

aldryn_bootstrap3/static/aldryn_bootstrap3/js/base.js

-22
Original file line numberDiff line numberDiff line change
@@ -669,25 +669,6 @@
669669
.replace(' ', '');
670670
return cls;
671671
}
672-
},
673-
674-
imagePlugin: function imagePlugin() {
675-
var useOriginalImageCheckbox = $('#id_use_original_image');
676-
var fieldsToToggle = $([
677-
'.field-aspect_ratio',
678-
'.field-shape',
679-
'.field-thumbnail',
680-
'.field-override_width',
681-
'.field-override_height'
682-
].join(', '));
683-
684-
useOriginalImageCheckbox.on('change', function () {
685-
if (this.checked) {
686-
fieldsToToggle.hide();
687-
} else {
688-
fieldsToToggle.show();
689-
}
690-
}).trigger('change');
691672
}
692673
};
693674

@@ -722,8 +703,5 @@
722703
if ($('.aldryn-bootstrap3-label').length) {
723704
bootstrap3.labelPlugin();
724705
}
725-
if ($('.model-boostrap3imageplugin').length) {
726-
bootstrap3.imagePlugin();
727-
}
728706
});
729707
})(window.jQuery || django.jQuery);

setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
'django-cms>=3.3.0',
1111
'django-durationfield>=0.5.1',
1212
'django-filer>=0.9.11',
13+
'djangocms-text-ckeditor>=3.1.0',
1314
'djangocms-attributes-field>=0.1.1',
1415
]
1516

0 commit comments

Comments
 (0)