开发者

form.as_table in django

开发者 https://www.devze.com 2023-03-02 03:33 出处:网络
form = EmailForm(开发者_开发百科) return render_to_response(\'books/send_mail.html\', {\'email_form\': form})
form = EmailForm(开发者_开发百科)
return render_to_response('books/send_mail.html', {'email_form': form})

When i am using form.as_table in my template, all the fields are getting rendered in the same line : (Email: Subject: Message: ).

How can i render these form fields in seperate lines using as_table. I dont want to use as_p or as_ul, because they do not have proper alignment.


Did you wrap your form in table tags?

You can also use form.as_table to output table rows (you'll need to provide your own tags)

0

精彩评论

暂无评论...
验证码 换一张
取 消