python Django 表单提交按钮
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2080332/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-03 23:43:06 来源:igfitidea点击:
Django Form Submit Button
提问by The.Anti.9
I have a pretty simple file upload form class in django:
我在 Django 中有一个非常简单的文件上传表单类:
class UploadFileForm(forms.Form):
category = forms.ChoiceField(get_category_list())
file = forms.FileField()
one problem is that when i do {{ form.as_p }}
, It has no submit button. How do i add one?
一个问题是,当我这样做时{{ form.as_p }}
,它没有提交按钮。我如何添加一个?
回答by Ignacio Vazquez-Abrams
<input type="submit" value="Gogogo!" />