Skip to content

Commit

Permalink
Edit code style
Browse files Browse the repository at this point in the history
  • Loading branch information
yakky committed Jun 20, 2016
1 parent 76981ca commit 3d8e764
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions cms/plugin_rendering.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,15 @@ def render_placeholder(placeholder, context_to_copy, name_fallback="Placeholder"
request.placeholders = {}

# Prepend frontedit toolbar output if applicable
toolbar = getattr(request, 'toolbar', None)
if (getattr(toolbar, 'edit_mode', False) and
getattr(toolbar, "show_toolbar", False) and
getattr(placeholder, 'is_editable', True) and editable):
try:
toolbar = getattr(request, 'toolbar', None)
except AttributeError:
toolbar = None

if (toolbar and toolbar.edit_mode and toolbar.show_toolbar and
placeholder.is_editable and editable):
from cms.middleware.toolbar import toolbar_plugin_processor
processors = (toolbar_plugin_processor, )
processors = (toolbar_plugin_processor,)
edit = True
else:
processors = None
Expand Down

0 comments on commit 3d8e764

Please sign in to comment.