Пример #1
0
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,})
Пример #2
0
def frame(context, href, height):
    return standard_dict(context, {'href': href, 'height': height })
Пример #3
0
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']})
Пример #4
0
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})
Пример #5
0
def subform(context, name):
    return standard_dict(context, {'href': name,})
Пример #6
0
def component(context, name):
    return standard_dict(context, {'href': name,})
Пример #7
0
def link(context, href, rel, typ):
    return standard_dict(context, {'href': settings.STATIC_URL + href, 'rel': rel, 'typ': typ})
Пример #8
0
def css_link(context, href):
    return standard_dict(context, {'href': href})
Пример #9
0
def ok_cancel(context):
    return standard_dict(context, {})