从上传的文件中填写一批django表单。
django-batchform的Python项目详细描述
django配料表
这个项目旨在提供一个简单而强大的方法来填充 一个上传文件(CSV,xlsx,…)中的一批表单
它使用了基于Django类的泛型视图,实现了非常简单的配置:
fromdjangoimportformsfrombatchformimportviewsclassLineForm(forms.Form):col1=forms.CharField(max_length=10)col2=forms.CharField(max_length=10)col3=forms.CharField(max_length=10)classBatchFormView(views.BaseUploadView):lines_form_class=LineFormcolumns=('col1','col2','col3')
演示
为了查看应用程序,只需克隆存储库, 确保存储库中有django,然后运行:
./manage.py runserver
链接
- pypi上的包:http://pypi.python.org/pypi/django-batchform/
- github上的源代码:https://github.com/rbarrois/django-batchform/
- 已读博士学位:(待办事项)
- Travis CI(TODO)上的连续集成