admin 管理员组文章数量: 1086019
I have a model form
forms.py
class (forms.ModelForm):
class Meta:
model = InfoPersonal
fields = [
'name',
'phone_number'
]
models.py
class InfoPersonal(models.Model):
name = models.CharField(_('Имя'), max_length=50)
phone_number = PhoneNumberField(
_('Номер телефона'), max_length=20, unique=True, blank=True, null=True,
personal_info-add.html
<form enctype="multipart/form-data"
action="{% url 'workflows:personal_info-add' user.pk %}" method="post">
{% include "_parts/form.html" with form=form %}
</form>
I want to get the result as shown in the picture( email -> name passord -> tel). Is it possible to add a tag in the module itself?
I need the <name> and <phone_number> fields to be inside the tag <fieldset> (legend)enter image description here
how to implement it help please!!!
本文标签: pythonfieldsets(legend) in modelform djangoStack Overflow
版权声明:本文标题:python - fieldsets(legend) in modelform django - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.roclinux.cn/p/1744060911a2526701.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论