Templatetags Package
Submodules
Breadcrumbs
SEED Platform (TM), Copyright (c) Alliance for Sustainable Energy, LLC, and other contributors. See also https://github.com/seed-platform/seed/main/LICENSE.md
breadcrumbs.py, https://bitbucket.org/Mathiasdm/django-simple-breadcrumbs/
- class seed.templatetags.breadcrumbs.BreadcrumbNode(vars, render_func=<function create_crumb>)
Bases:
Node
- render(context)
Return the node rendered as a string.
- class seed.templatetags.breadcrumbs.UrlBreadcrumbNode(title, url_node, render_func=<function create_crumb>)
Bases:
Node
- render(context)
Return the node rendered as a string.
- seed.templatetags.breadcrumbs.breadcrumb(parser, token)
Section author: Andriy Drozdyuk
Renders the breadcrumb.
Example:
{% 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 %}
- seed.templatetags.breadcrumbs.breadcrumb_root(parser, token)
Section author: Andriy Drozdyuk
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 %}
- 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