From 5a44a3aec66a39bfd4ea9a6573aa202ed53bbc83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Thu, 28 Dec 2017 11:02:53 +0100 Subject: [PATCH] general: remove blurps (#20914) --- README | 4 ---- combo/apps/wcs/models.py | 2 +- combo/data/models.py | 41 ----------------------------------------- combo/settings.py | 1 - debian/control | 1 - jenkins.sh | 1 - requirements.txt | 1 - setup.py | 1 - 8 files changed, 1 insertion(+), 51 deletions(-) diff --git a/README b/README index 7c795a8..3180819 100644 --- a/README +++ b/README @@ -81,10 +81,6 @@ Details on these options and additional SAML settings are available in the documentation of django-mellon. -Blurps (from cmsplugin-blurp module) can be used to define additional cell -types, the CMS_PLUGIN_BLURP_RENDERERS variable is used to hold them, details -can be found in the cmsplugin-blurp documentation. - In addition to common attributes Combo supports a 'private' attribute, that can be used to exclude the given blurp from selectable cells. The blurp itself can still be referenced manually in a template file. This is useful to avoid diff --git a/combo/apps/wcs/models.py b/combo/apps/wcs/models.py index 7579400..be436bf 100644 --- a/combo/apps/wcs/models.py +++ b/combo/apps/wcs/models.py @@ -370,7 +370,7 @@ class WcsFormsOfCategoryCell(WcsCommonCategoryCell, WcsBlurpMixin): try: context['forms'] = list(context['forms'][self.wcs_site]['data']) except (KeyError, TypeError) as e: - # an error occured in the blurp + # an error occured when getting the data context['forms'] = [] # default sort is alphabetical, it's always done as this will serve as diff --git a/combo/data/models.py b/combo/data/models.py index 035ce4e..cb8d06a 100644 --- a/combo/data/models.py +++ b/combo/data/models.py @@ -45,7 +45,6 @@ from django.template import Context, RequestContext, Template from django.test.client import RequestFactory from .fields import RichTextField -import cmsplugin_blurp.utils from jsonfield import JSONField @@ -595,46 +594,6 @@ class UnlockMarkerCell(CellBase): def render(self, context): return '' -@register_cell_class -class BlurpCell(CellBase): - blurp_key = models.CharField(max_length=50) - - @classmethod - def get_cell_types(cls): - try: - blurp_renderers = settings.CMS_PLUGIN_BLURP_RENDERERS - except AttributeError: - return [] - l = [] - for blurp_key, blurp_value in blurp_renderers.items(): - if blurp_value.get('private'): - continue - l.append({ - 'name': blurp_value.get('name'), - 'cell_type_str': cls.get_cell_type_str(), - 'group': _('Extra'), - 'variant': blurp_key, - }) - l.sort(lambda x, y: cmp(x.get('name'), y.get('name'))) - return l - - def get_label(self): - return settings.CMS_PLUGIN_BLURP_RENDERERS[self.blurp_key]['name'] - - def set_variant(self, variant): - self.blurp_key = variant - - def render(self, context): - if settings.CMS_PLUGIN_BLURP_RENDERERS[self.blurp_key].get('ajax') and not context.get('synchronous'): - raise NothingInCacheException() - renderer = cmsplugin_blurp.utils.resolve_renderer(self.blurp_key) - template = renderer.render_template() - context = renderer.render(context) - return template.render(context) - - def get_default_form_class(self): - return None - @register_cell_class class MenuCell(CellBase): diff --git a/combo/settings.py b/combo/settings.py index f1ba171..552a1bb 100644 --- a/combo/settings.py +++ b/combo/settings.py @@ -58,7 +58,6 @@ INSTALLED_APPS = ( 'ckeditor', 'gadjo', 'sorl.thumbnail', - 'cmsplugin_blurp', 'combo.data', 'combo.profile', 'combo.manager', diff --git a/debian/control b/debian/control index b58b9aa..bbd4a11 100644 --- a/debian/control +++ b/debian/control @@ -14,7 +14,6 @@ Depends: ${misc:Depends}, ${python:Depends}, python-gadjo, python-requests, python-feedparser, - python-django-cmsplugin-blurp, python-xstatic-chartnew-js, python-xstatic-josefinsans, python-xstatic-leaflet, diff --git a/jenkins.sh b/jenkins.sh index 452dcc4..584f238 100755 --- a/jenkins.sh +++ b/jenkins.sh @@ -16,7 +16,6 @@ pip install --upgrade pylint pylint-django pip install --upgrade -r requirements.txt pip install --upgrade pytest pytest-django pytest-cov WebTest django-webtest 'setuptools<34' pip install --upgrade 'django>=1.8, <1.9' -pip install --no-deps --upgrade 'git+http://repos.entrouvert.org/cmsplugin-blurp.git/#egg=django-cmsplugin-blurp' # use blurp from git/master for now pip install --upgrade XStatic-ChartNew.js pip install --upgrade mock diff --git a/requirements.txt b/requirements.txt index c797bec..ea18253 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,6 @@ Django>=1.8, <1.9 django-ckeditor<4.5.3 gadjo -django-cmsplugin-blurp feedparser django-jsonfield requests diff --git a/setup.py b/setup.py index 2a6d86b..7fe59c7 100644 --- a/setup.py +++ b/setup.py @@ -106,7 +106,6 @@ setup( install_requires=['django>=1.8, <1.9', 'django-ckeditor<4.5.3', 'gadjo', - 'django-cmsplugin-blurp', 'feedparser', 'django-jsonfield', 'requests', -- 2.15.1