示例#1
0
文件: exsyntax.py 项目: JdeH/pytigon
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
文件: exsyntax.py 项目: JdeH/pytigon
def frame(context, href, height):
    return standard_dict(context, {'href': href, 'height': height })
示例#3
0
文件: exsyntax.py 项目: JdeH/pytigon
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
文件: exsyntax.py 项目: JdeH/pytigon
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
文件: exsyntax.py 项目: JdeH/pytigon
def subform(context, name):
    return standard_dict(context, {'href': name,})
示例#6
0
文件: exsyntax.py 项目: JdeH/pytigon
def component(context, name):
    return standard_dict(context, {'href': name,})
示例#7
0
文件: exsyntax.py 项目: JdeH/pytigon
def link(context, href, rel, typ):
    return standard_dict(context, {'href': settings.STATIC_URL + href, 'rel': rel, 'typ': typ})
示例#8
0
文件: exsyntax.py 项目: JdeH/pytigon
def css_link(context, href):
    return standard_dict(context, {'href': href})
示例#9
0
文件: exsyntax.py 项目: JdeH/pytigon
def ok_cancel(context):
    return standard_dict(context, {})