这是我的模板代码
{% block content %}
<div class='main'>
<form method='POST' action='/social/profile/' enctype='multipart/form-data'>
{% csrf_token %}
<h3>Select an image for your profile. Max 300x300 and 1mb.</h3>
<br/>
<img src="{{ image.url }}" alt="Profile Image" height="100px" width="100px" />
{{ form.profileimg.errors }}
{{ form.profileimg }}
{{ form.non_field_errors }}
<br/>
<h3>Enter or edit your details</h3> <br/>
<textarea name='text' cols='50' rows='3'>{{ text }}</textarea>
<h3>Current Workplace</h3>
<br/>
<input id="workplace" type="text" class="" name="workplace" value="{{ workplace }}">
<h3>Telephone Number</h3>
<br/>
<input id="telephone" type="text" class="" name="telephone" value="{{ telephone }}">
<h3>Address</h3>
<br/>
<textarea id="address" type="text" class="" name="address">{{ address }}</textarea>
<br/>
<input type="submit" value="Submit" >
</form>
</div>
{% endblock %}
在表单.profileimg非常简单,只有一个ImageField。在
但是由于某种原因,提交按钮不能点击?它在表单.profileimg字段,我可以不混合Django表单和普通html吗?在
浏览器源:
^{pr2}$
问题是页脚。CSS被搞乱了,所以不知何故被覆盖在按钮的顶部。在
相关问题 更多 >
编程相关推荐