Django表单提交按钮不可点击/工作

2024-09-29 17:20:45 发布

您现在位置:Python中文网/ 问答频道 /正文

这是我的模板代码

{% 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}$

Tags: textnamebrformidinputvalueaddress

热门问题