Skip to content

Commit c13faea

Browse files
committed
Created a template to delete the photos
1 parent c1ba311 commit c13faea

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<!DOCTYPE html>
2+
<html lang="en" dir="ltr">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<title>Photo Gallery | Delete Photo</title>
7+
<link rel="icon" type="image/x-icon" href="#">
8+
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
9+
</head>
10+
11+
<style media="screen">
12+
* {
13+
margin: 0;
14+
padding: 0;
15+
box-sizing: border-box;
16+
}
17+
body {
18+
font-family: 'Arial Black', sans-serif;
19+
background: #fff;
20+
}
21+
.photo {
22+
padding: 20px;
23+
color: #000;
24+
background: #fff;
25+
}
26+
.post {
27+
margin-bottom: 2px;
28+
}
29+
.btn, .btn:hover {
30+
margin: 30px;
31+
margin-bottom: 20px;
32+
}
33+
.btn:hover {
34+
color: #fff;
35+
background: #000;
36+
}
37+
</style>
38+
39+
<body>
40+
<div class="photo">
41+
<img src="{{ photo.image.url }}" alt="{{ photo.name }}">
42+
<form method="post">
43+
{% csrf_token %}
44+
<p>Are you sure you want to delete this photo?</p>
45+
<input type="hidden" name="photo_id" value="{{ photo.id }}">
46+
<button class="btn btn-danger" type="submit">Delete</button>
47+
<a href="{% url 'gallery' %}">No, go back</a>
48+
</form>
49+
</div>
50+
</body>
51+
</html>

0 commit comments

Comments
 (0)