本文介绍了Django Forms 和 Bootstrap - CSS 类和 <divs>的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在 Django 中使用 Twitter Bootstrap 来呈现表单.>
Bootstrap 可以很好地格式化您的表单 - 只要您拥有它期望包含的 CSS 类.
但是,我的问题是 Django 的 {{ form.as_p }} 生成的表单不能很好地与 Bootstrap 一起呈现,因为它们没有这些类.
例如 Django 的输出:
更多推荐
Django Forms 和 Bootstrap
发布评论