seed.templatetags package

Submodules

seed.templatetags.breadcrumbs module

:copyright (c) 2014 - 2015, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Department of Energy) and contributors. All rights reserved. # NOQA :author

class seed.templatetags.breadcrumbs.BreadcrumbNode(vars, render_func=<function create_crumb at 0x7fb89baa4320>)

Bases: django.template.base.Node

render(context)
class seed.templatetags.breadcrumbs.UrlBreadcrumbNode(title, url_node, render_func=<function create_crumb at 0x7fb89baa4320>)

Bases: django.template.base.Node

render(context)
seed.templatetags.breadcrumbs.breadcrumb(parser, token)

Renders the breadcrumb. Examples:

{% breadcrumb “Title of breadcrumb” url_var %} {% breadcrumb context_var url_var %} {% breadcrumb “Just the title” %} {% breadcrumb just_context_var %}

Parameters: -First parameter is the title of the crumb, -Second (optional) parameter is the url variable to link to, produced by url tag, i.e.:

{% url “person_detail” object.id as person_url %} then: {% breadcrumb person.name person_url %}

@author Andriy Drozdyuk

seed.templatetags.breadcrumbs.breadcrumb_root(parser, token)

Renders the breadcrumb. Examples:

{% breadcrumb “Title of breadcrumb” url_var %} {% breadcrumb context_var url_var %} {% breadcrumb “Just the title” %} {% breadcrumb just_context_var %}

Parameters: -First parameter is the title of the crumb, -Second (optional) parameter is the url variable to link to, produced by url tag, i.e.:

{% url “person_detail/” object.id as person_url %} then: {% breadcrumb person.name person_url %}

@author Andriy Drozdyuk

seed.templatetags.breadcrumbs.breadcrumb_url(parser, token)

Same as breadcrumb but instead of url context variable takes in all the arguments URL tag takes.

{% breadcrumb “Title of breadcrumb” person_detail person.id %} {% breadcrumb person.name person_detail person.id %}
seed.templatetags.breadcrumbs.breadcrumb_url_root(parser, token)

Same as breadcrumb but instead of url context variable takes in all the arguments URL tag takes.

{% breadcrumb “Title of breadcrumb” person_detail person.id %} {% breadcrumb person.name person_detail person.id %}
seed.templatetags.breadcrumbs.create_crumb(title, url=None)

Helper function

seed.templatetags.breadcrumbs.create_crumb_first(title, url=None)

Helper function

Module contents

:copyright (c) 2014 - 2015, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Department of Energy) and contributors. All rights reserved. # NOQA :author