Skip to content
This repository has been archived by the owner on Jan 11, 2019. It is now read-only.

Commit

Permalink
rename “standard” to “bootstrap3”
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanfoulis committed Jan 28, 2015
1 parent ac27877 commit f48354a
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ Add ``aldryn_gallery`` to ``INSTALLED_APPS``.
Configure ``aldryn-boilerplates`` (https://pypi.python.org/pypi/aldryn-boilerplates/).

To use the old templates, set ``ALDRYN_BOILERPLATE_NAME='legacy'``.
To use https://github.com/aldryn/aldryn-boilerplate-standard (recommended) set
``ALDRYN_BOILERPLATE_NAME='standard'``.
To use https://github.com/aldryn/aldryn-boilerplate-standard (recommended, will be renamed to
``aldryn-boilerplate-bootstrap3``) set ``ALDRYN_BOILERPLATE_NAME='bootstrap3'``.

When using the ``legacy`` boilerplate, **jQuery** and
`classjs <https://github.com/finalangel/classjs-plugins>`_ cl.gallery are required.
4 changes: 2 additions & 2 deletions aldryn_gallery/cms_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@ def render(self, context, instance, placeholder):
context['instance'] = instance
if settings.ALDRYN_BOILERPLATE_NAME == 'legacy':
context['slide_template'] = self.get_slide_template(instance=instance, name='slide')
else: # for 'standard' boilerplate and the recommended structure for new plugins
else: # for 'bootstrap3' boilerplate and the recommended structure for other boilerplates
context['slide_template'] = self.get_slide_template(instance=instance, name='image_slide')
return context

def get_render_template(self, context, instance, placeholder):
if settings.ALDRYN_BOILERPLATE_NAME == 'legacy':
return 'aldryn_gallery/plugins/slide_folder.html'
else: # for 'standard' boilerplate and the recommended structure for new plugins
else: # for 'bootstrap3' boilerplate and the recommended structure for other boilerplates
return self.get_slide_template(instance=instance, name='slide_folder')


Expand Down
10 changes: 5 additions & 5 deletions aldryn_gallery/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,19 +120,19 @@ def test_render_legacy_boilerplate_templates(self):
api.publish_page(self.page, self.superuser, self.language)
response = self.client.get(self.page.get_absolute_url())
# self.assertTrue('LEGACY GALLERY' in response.content)
# self.assertFalse('STANDARD GALLERY' in response.content)
# self.assertFalse('BOOTSTRAP3 GALLERY' in response.content)
template_loaders.clear_cache()

@override_settings(ALDRYN_BOILERPLATE_NAME='standard')
def test_render_standard_boilerplate_templates(self):
@override_settings(ALDRYN_BOILERPLATE_NAME='bootstrap3')
def test_render_bootstrap3_boilerplate_templates(self):
"""
tests whether "standard" templates exist and don't cause import issues
tests whether "bootstrap3" templates exist and don't cause import issues
"""
from aldryn_boilerplates import template_loaders
template_loaders.clear_cache()
self.test_add_gallery_plugin_api()
api.publish_page(self.page, self.superuser, self.language)
response = self.client.get(self.page.get_absolute_url())
# self.assertTrue('STANDARD GALLERY' in response.content)
# self.assertTrue('BOOTSTRAP3 GALLERY' in response.content)
# self.assertFalse('LEGACY GALLERY' in response.content)
template_loaders.clear_cache()

0 comments on commit f48354a

Please sign in to comment.