thaliawebsite.templatetags package

Submodules

thaliawebsite.templatetags.alert module

thaliawebsite.templatetags.alert.alert(type='info', message=None, dismissible=False, extra_classes='')[source]

thaliawebsite.templatetags.baseurl module

Obtain the base url

thaliawebsite.templatetags.baseurl.baseurl()[source]
Returns

the BASE_URL defined in the settings

thaliawebsite.templatetags.bleach_tags module

Bleach allows to clean up user input to make it safe to display, but allow some HTML.

thaliawebsite.templatetags.bleach_tags.bleach(value)[source]

Bleach dangerous html from the input

Examples:

>>> bleach('<script></script>')
''
>>> bleach('simple')
'simple'
>>> bleach('<a href="http://example.com/">ex</a>')
'<a href="http://example.com/">ex</a>'
>>> bleach('<div class="bla"></div>')
'<div class="bla"></div>'
>>> bleach('<img src="https://i.redd.it/22kypw2l93gz.jpg" alt="bees">')
'<img alt="bees" src="https://i.redd.it/22kypw2l93gz.jpg">'
>>> bleach('<iframe width="560" height="315" '
... 'src="https://www.youtube.com/embed/dQw4w9WgXcQ?rel=0" '
... 'frameborder="0" allowfullscreen></iframe>') == (
...     '<iframe allowfullscreen="" frameborder="0" height="315" '
...     'src="https://www.youtube.com/embed/dQw4w9WgXcQ?rel=0" '
...     'width="560"></iframe>')
True
>>> bleach('<iframe src="https://clearlyreta.rded.nl/ivo/"></iframe>')
'<iframe></iframe>'

thaliawebsite.templatetags.fieldtype module

Get the field type for a form field

thaliawebsite.templatetags.fieldtype.fieldtype(field)[source]

Get the field type for a form field.

Parameters

field – field for which to get the field type

Returns

field type

Return type

str

thaliawebsite.templatetags.grid_item module

thaliawebsite.templatetags.grid_item.grid_item(title=None, meta_text='', url=None, image_url=None, ribbon=None, class_name='', anchor_attrs='')[source]

thaliawebsite.templatetags.menu module

Provides a template handler that renders the menu

thaliawebsite.templatetags.menu.render_main_menu(context)[source]

Renders the main menu in this place.

Accounts for logged-in status and locale.

thaliawebsite.templatetags.pick_header_image module

Get a random header image

thaliawebsite.templatetags.pick_header_image.pick_header_image()[source]

Renders a random header image