Issue #56, remove remaining side bar templates code

This commit is contained in:
Roberto Rosario
2014-10-27 16:31:18 -04:00
parent a728690335
commit 4262b750b9
2 changed files with 0 additions and 30 deletions

View File

@@ -358,13 +358,6 @@
</div>
{% endif %}
{% get_sidebar_templates as sidebar_templates %}
{% for template in sidebar_templates %}
{% with 'true' as side_bar %}
{% include template %}
{% endwith %}
{% endfor %}
{% block sidebar %}{% endblock %}
</div><!--end #sidebar-->
</div><!--end #wrapper .wat-cf-->

View File

@@ -273,26 +273,3 @@ def get_multi_item_links_form(context):
form = MultiItemForm(actions=actions)
context.update({'multi_item_form': form, 'multi_item_actions': actions})
return ''
class GetSidebarTemplatesNone(Node):
def __init__(self, var_name='sidebar_templates'):
self.var_name = var_name
def render(self, context):
request = Variable('request').resolve(context)
view_name = resolve_to_name(request.META['PATH_INFO'])
context[self.var_name] = sidebar_templates.get(view_name, [])
return ''
@register.tag
def get_sidebar_templates(parser, token):
tag_name, arg = token.contents.split(None, 1)
m = re.search(r'("?\w+"?)?.?as (\w+)', arg)
if not m:
raise TemplateSyntaxError('%r tag had invalid arguments' % tag_name)
menu_name, var_name = m.groups()
return GetSidebarTemplatesNone(var_name=var_name)