mirror of https://github.com/snachodog/mybuddy.git
Add a Child delete confirm template.
This commit is contained in:
parent
54f8513fcc
commit
065e166ac1
|
@ -0,0 +1,13 @@
|
|||
{% extends 'core/base.html' %}
|
||||
{% load widget_tweaks %}
|
||||
|
||||
{% block title %}Delete a Child{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form role="form" method="post">
|
||||
{% csrf_token %}
|
||||
<h1>Are you sure you want to delete <span class="text-info">{{ object }}</span>?</h1>
|
||||
<input type="submit" value="Delete" class="btn btn-danger" />
|
||||
<a href="{% url 'child-list' %}" class="btn btn-default">Cancel</a>
|
||||
</form>
|
||||
{% endblock %}
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
{% block content %}
|
||||
{% if object %}
|
||||
<h1>Update <span class="text-info">{{ object.first_name }} {{ object.last_name }}</span></h1>
|
||||
<h1>Update <span class="text-info">{{ object }}</span></h1>
|
||||
{% else %}
|
||||
<h1>Add a Child</h1>
|
||||
{% endif %}
|
||||
|
@ -34,5 +34,6 @@
|
|||
</div>
|
||||
{% endfor %}
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
<a href="{% url 'child-list' %}" class="btn btn-default">Cancel</a>
|
||||
</form>
|
||||
{% endblock %}
|
|
@ -30,3 +30,4 @@ class ChildUpdate(UpdateView):
|
|||
|
||||
class ChildDelete(DeleteView):
|
||||
model = Child
|
||||
success_url = '/children'
|
||||
|
|
Loading…
Reference in New Issue