Add custom file upload
This commit is contained in:
parent
680de724ba
commit
44c4795282
3 changed files with 61 additions and 0 deletions
16
templates/custom_file_upload.html
Normal file
16
templates/custom_file_upload.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block body %}
|
||||
<center>
|
||||
{% if file_url %}
|
||||
<p>{{_('Your file has been uploaded successfully')}}: <a href="{{ file_url }}" target="_blank">{{ file_url }}</a></p>
|
||||
<a href="{{ url('custom_file_upload') }}" class="button small" style="width: fit-content;">{{_('Upload another file')}}</a>
|
||||
{% else %}
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p() }}
|
||||
<button type="submit">{{_('Upload file')}}</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</center>
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue