thaliawebsite.templatetags package¶
Submodules¶
thaliawebsite.templatetags.alert module¶
thaliawebsite.templatetags.baseurl module¶
Obtain the base url
- 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.
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
Get the field type for a form field.
- Parameters
field – field for which to get the field type
- Returns
field type
- Return type
thaliawebsite.templatetags.grid_item module¶
thaliawebsite.templatetags.pick_header_image module¶
Get a random header image
Renders a random header image