Skip to content
Snippets Groups Projects
Commit f118cb3b authored by Tom Teichler's avatar Tom Teichler :beers:
Browse files

Document templatetags

parent 18a4f0bb
No related branches found
No related tags found
1 merge request!333Documentation for beta release (Documentation for first release part 1)
Pipeline #3081 failed
......@@ -9,7 +9,11 @@ register = template.Library()
def add_class_to_el(value: str, arg: str) -> str:
"""Add a CSS class to every occurence of an element type.
Example: {{ mymodel.myhtmlfield|add_class_to_el:"ul,browser-default"
:Example:
.. code-block:: jinja2
{{ mymodel.myhtmlfield|add_class_to_el:"ul,browser-default" }}
"""
el, cls = arg.split(",")
soup = BeautifulSoup(value, "html.parser")
......
Template tags
=============
AlekSIS provides some templatetags to display data in templates.
Dashboard
---------
.. automodule:: aleksis.core.templatetags.dashboard
:members:
Data helpers
------------
.. automodule:: aleksis.core.templatetags.data_helpers
:members:
HTML helpers
------------
.. automodule:: aleksis.core.templatetags.html_helpers
:members:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment