I created an account settings page where the user can update their profile. One of the things they can change is their profile picture. I am using the table
tag to arrange the settings form as you can see below:
<form action="" method="POST" enctype="multipart/form-data">
{% csrf_token %}
<table class="user_settings_table">
<tbody>
{% for form in user_form %}
<tr>
<td class="table_labels">{{form.label}}</td>
<td>{{form}}</td>
</tr>
{% endfor %}
{% for form in profile_form %}
<tr>
<td class="table_labels">{{form.label}}</td>
<td>{{form}}</td>
</tr>
{% endfor %}
</tbody>
</table>
<input type="submit" class="danger_btn" value="Update Profile">
</form>
This is how the page currently looks like:
I want to know how we can edit the imagefield in django. For example, I may want to remove the clear checkbox and handle that automatically when the user changes his/her profile picture or I may want to only show the name of the image file and not the path.