-----------form.
html start--------------
{% extends "crud_app/[Link]" %}
{% block title %}
form
{% endblock title %}
{% block content %}
<h1>Add Student Information<h1>
<div class="container">
<div class="row">
<div class="col-10 mx-auto alert alert-info">
<form method="POST" and enctype="multipart/form-data" action="{% url 'form'
%}">
{% if messages %}
<div id="good">
{% for message in messages %}
<div class="alert alert-{{[Link]}}">
<strong>Message:</strong>{{ message }}.
</div>
{% endfor %}
</div>
{% endif %}
{% csrf_token %}
<div class="mb-3">
<label for="name" class="form-label">Name</label>
<input type="text" name="name" class="form-control" id="name" >
</div>
<div class="mb-3">
<label for="age" class="form-label">Age</label>
<input type="number" name="age" class="form-control" id="age" >
</div>
<div class="mb-3">
<label for="email" class="form-label">Email</label>
<input type="email" name="email" class="form-control" id="email">
</div>
<div class="mb-3">
<label for="image" class="form-label">Image</label>
<input type="file" name="image" class="form-control" id="email">
</div>
<div class="mb-3">
<textarea name="message" class="form-control" placeholder=""
id="floatingTextarea2" style="height: 100px"></textarea>
<label for="floatingTextarea2">Message</label>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
</div>
</div>
</div>
<script>
setTimeout(function(){
const abc=[Link]('good')
if (good){
[Link]='none'
}
},5000)
</script>
{% endblock content %}
---------------------------------------------[Link] end
here-------------------------------------
-----------------------------------------[Link] starts
here-----------------------------
{% extends "crud_app/[Link]" %}
{% block title %}
home
{% endblock title %}
{% block content %}
<link rel ="stylesheet" type = "text/css" href
="[Link]
<script src="[Link]
script>
<script src = "[Link]
script>
<h1 class="text-center alert alert-success">This is the Home Page</h1>
<div class="container">
<div class="row">
<div class="col-12 mx-auto alert alert-secondary">
<h3 class="text-center">Student Data</h3>
</div>
</div>
<!-- Table Starts -->
<div class="table-responsive">
<button class="btn btn-info" >Clear Items</button>
<table class="table table-striped table-bordered table-hover table-sm" id =
"myTable">
<thead class="thead-dark">
<tr>
<th>S.N</th>
<th scope="col">ID</th>
<th scope="col">Full Name</th>
<th scope="col">Age</th>
<th scope="col">Email</th>
<th scope="col">Message</th>
<th scope="col">Action</th>
<th scope="col">Images</th>
</tr>
</thead>
<tbody>
{% for i in data %}
<tr>
<th scope="row">{{ [Link]}}</th>
<th scope="row">{{ [Link] }}</th>
<td>{{ [Link] }}</td>
<td>{{ [Link] }}</td>
<td>{{ [Link] }}</td>
<td>
{% if [Link] %}
<img src="{{[Link]}}" height="100px"width="100px"alt="">
{% endif %}
</td>
<td>{{ [Link] }}</td>
<td>
<a href="{% url 'edit' [Link] %}">
<button class="btn btn-primary">
<i class="fa-solid fa-pen-to-square"></i> Edit
</button>
</a>
<a href="{% url 'delete_data' [Link] %}"><button class="btn btn-
danger"><i class="fa-solid fa-trash"></i>
Delete</button></a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% if data|length < 1 %}
<h1 class="text-center alert alert-danger">Data is not found</h1>
{% endif %}
</div>
<!-- Table Ends -->
<a href="recycle"><button class="btn btn-warning">Recycle</button></a>
</div>
<script>
let table = new DataTable('#myTable');
</script>
{% endblock content %}
---------------------------------------------[Link] ends
here----------------------
-----------------[Link] starts here---------------------------
{% extends "crud_app/[Link]" %}
{% block title %} form {% endblock title %}
{% block content %}
<h1>Update Student Information</h1>
<div class="container">
<div class="row">
<div class="col-10 mx-auto alert alert-info">
<form method="POST" action="{% url 'edit' [Link] %}">
{% if messages %}
<div id="good">
{% for message in messages %}
<div class="alert alert-{{ [Link] }}">
<strong>Message:</strong> {{ message }}.
</div>
{% endfor %}
</div>
{% endif %}
{% csrf_token %}
<div class="mb-3">
<label for="name" class="form-label">Name</label>
<input type="text" value="{{ [Link] }}" name="name" class="form-
control" id="name">
</div>
<div class="mb-3">
<label for="age" class="form-label">Age</label>
<input type="number" value="{{ [Link] }}" name="age" class="form-
control" id="age">
</div>
<div class="mb-3">
<label for="email" class="form-label">Email</label>
<input type="email" value="{{ [Link] }}" name="email" class="form-
control" id="email">
</div>
<div class="mb-3">
<textarea name="message" class="form-control" placeholder=""
id="floatingTextarea2" style="height: 100px">{{ [Link] }}</textarea>
<label for="floatingTextarea2">Message</label>
</div>
<button type="submit" class="btn btn-primary">Update</button>
</form>
</div>
</div>
</div>
<script>
setTimeout(function() {
const abc = [Link]('good');
if (abc) {
[Link] = 'none';
}
}, 5000);
</script>
{% endblock content %}
------------[Link] ends here----------------------------------