Leonardo CMS的表单设计器和远程表单
leonardo-module-forms的Python项目详细描述
莱昂纳多的表单生成器。
技术上只不过是虚幻的Form Designer和Remote Forms。
Installation
pip install leonardo_module_forms
或作为Leonardo Bundle
pip install django-leonardo["forms"]
可选地,您可以安装远程表单键入此内容
pip install leonardo_module_forms[remote]
https://github.com/WiserTogether/django-remote-forms
和google recaptcha
pip install leonardo_module_forms[recaptcha]
将leonardo_module_forms添加到local_settings.py:
APPS = [ ... 'forms' ... ]
将新模板加载到数据库
python manage.py sync_all
Writing your own Layout
定制有两种选择。 一种是定义清晰的布局,如下所示
Layout(Fieldset('first arg is the legend of the fieldset','test',),ButtonHolder(Submit('submit','Submit',css_class='button white')),HTML(""" <p>We use notes to get better, <strong>please help us {{ username }}</strong></p> """),)
有关完整的参考资料,请访问http://django-crispy-forms.readthedocs.org/en/latest/layouts.html
其次是编写自定义模板并逐字段呈现表单。因为这是那里的模板。