mewlo.mpacks.core.template.mtemplatehelper module

mtemplatehelper.py This module contains classes and functions that are passed to template to assist in producing text (menus, navbars, etc.) The template files can refer to and make calls of this class [see testsite1/views/heeader.jn2 which makes calls like {{ thelper.nav_bar_html(response) }} ]

class mewlo.mpacks.core.template.mtemplatehelper.MewloTemplateHelper(mewlosite, debugmode)[source]

Bases: mewlo.mpacks.core.manager.manager.MewloManager

The MewloTemplateHelper class helps templates render output.

description = 'The template helper is accessed within view files to provide shortcut helper functions and text'
dumps(indent=0)[source]

Return a string (with newlines and indents) that displays some debugging useful information about the object.

html_autoform(form)[source]

Render form html automatically by inspecting form fields.

html_debugfooter(request)[source]

Some simple debug html at bottom of page.

html_formfield_witherror(field)[source]

Return html for the form with inline errors.

messages_html(messages, title)[source]

Format some messages.

nav_bar_html(response)[source]

Make a navar html.

nav_breadcrumb_html(response)[source]

Make a navar html.

nav_pagetitle(response)[source]

Page title from navnodes.

page_messages_html(request, title='')[source]

Show any page messages for client – these are generic messages that can be added to any page context

session_messages_html(request, title=None)[source]

Show any pending session messages for client.

typestr = 'core'

Table Of Contents

Previous topic

mewlo.mpacks.core.template.mtemplate_jinja2 module

Next topic

mewlo.mpacks.core.user package

This Page