脆皮表格标签非英语

时间:2018-10-12 21:54:52

标签: django forms

我对编码还比较陌生。我的问题是,尽管我的脆皮形式效果很好, 我想用希腊语写标签和标签表格。当我在Tab中执行此操作时,脆皮表单看不到识别希腊字母。在选项卡上,仅更改选项卡而不显示内容。在标签(输入)上,只需隐藏输入即可,仅呈现英文字符。

ClassExampleForm(ModelForm)

helper = FormHelper()
helper.form_method = 'POST'
helper.layout = Layout(
    TabHolder(

        Tab('A',
            'name', #in Greek 'ονομα' doesn't being rendered#
            'surname',
            'birthdate',
            'school_id'),

        Tab('B',
            'fathers_name',
            'fathers_surname',
            'fathers_origin'),

    ),
)

helper.layout.append(Submit('submit', 'Submit'))

class Meta:
    model = Example
    fields = ['name' , 'surname' , 'birthdate', 'school_id' , 'fathers_name', 'fathers_surname', 'fathers_origin']

enter image description here

enter image description here

0 个答案:

没有答案
相关问题