开发者

Django - Cannot display a form field as a textarea

I am declaring a field as a textarea. It works o开发者_JAVA技巧n my local server but not on my remote server. I am using Django version 1.2.3 on my local server and 1.2.5 on my remote server. Here is the code I am using to display a field as a textarea:

message = forms.CharField(widget=forms.Textarea)

Then, I display the form using:

{{ form.message }}

On my remote server, it continues to display as an input and not as a textarea. I triple checked to make sure the files were in sync. I used vim and ensured that the files matched each other. Is this because the newer version has a different way of turning inputs into textareas?


You need to restart the Python interpreter on the remote host. If you're using mod_wsgi, this would mean touch the .wsgi file.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜