Skip to content

Commit 6069a08

Browse files
authored
Merge pull request #24 from ravin-d-27/ravinFileServer
Done with file deletion problem
2 parents eb3bf5a + ef4ded4 commit 6069a08

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

File_Server/File_Server/templates/base.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,12 @@
113113
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
114114
</div>
115115
{% endif %}
116+
117+
{% if delete_success %}
118+
<div class="container alert alert-success" id="alert-container" role="alert">
119+
{{ delete_success }}
120+
</div>
121+
{% endif %}
116122

117123
</div>
118124

File_Server/files/templates/files/file_list.html

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@
3131
<div class='container'>
3232
<br><br>
3333
<div class='container'>
34-
{% if delete_success %}
35-
<div class="container alert alert-success" id="alert-container" role="alert">
36-
{{ delete_success }}
37-
</div>
38-
{% endif %}
3934

4035
{% if done %}
4136
<div class="container alert alert-success" id="alert-container" role="alert">

File_Server/files/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def delete_file(request, unique_token):
8181
file_instance.delete()
8282

8383
files = UploadedFile.objects.filter(user=request.user)
84-
return render(request,'files/file_list.html',{'delete_success':"The file {} is Deleted Successfully".format(file_path)})
84+
return render(request,'accounts/home.html',{'delete_success':"The file {} is Deleted Successfully".format(file_path)})
8585

8686

8787

0 commit comments

Comments
 (0)