def htmlwidget_js(context): if 'html_widget_dict' in context: html_widget_tab = context['html_widget_dict'] else: html_widget_tab = [] tab2 = [] for pos in html_widget_tab: tab2.append('widgets/html_widgets/'+pos+'_js.html') return standard_dict(context, {'html_widget_tab': tab2,})
def frame(context, href, height): return standard_dict(context, {'href': href, 'height': height })
def form2columns(context, fields): ftab = fields.split(';') it = iter(ftab) fields2 = itertools.zip_longest(it,it) return standard_dict(context, {'fields': ftab, 'fields2': fields2, 'form': context['form']})
def checkboxselectmultiple(context, field, only_field=False): field.field.widget = CheckboxSelectMultiple(choices=field.field.choices) field.field.widget.attrs['class'] = "list-group row" return standard_dict(context, {'field': field, 'only_field': only_field})
def subform(context, name): return standard_dict(context, {'href': name,})
def component(context, name): return standard_dict(context, {'href': name,})
def link(context, href, rel, typ): return standard_dict(context, {'href': settings.STATIC_URL + href, 'rel': rel, 'typ': typ})
def css_link(context, href): return standard_dict(context, {'href': href})
def ok_cancel(context): return standard_dict(context, {})