Hi, I have a problem with my DeleteView
in Django 1.8, I get this error:
TemplateDoesNotExist at /eliminar_tipo_almacen/38/appkardex/tipo_almacen_confirm_delete.html
views.py:
from django.views.generic import ListView, UpdateView, DeleteView
class EliminarTipoAlmacen(DeleteView):
model = Tipo_almacen
success_url = reverse_lazy('lista_tipo_almacen')
urls.py
url(r'^eliminar_tipo_almacen/(?P<pk>\d+)/$', views.EliminarTipoAlmacen.as_view(), name='eliminar_tipo_almacen'
list_type_almace.html:
<table class="table">
<thead>
<th>Nombre</th>
<th>Acciones</th>
</thead>
<tbody>
{% for data in lista_tipo_almacen %}
<tr>
<td>{{ data.descripcion }}</td>
<td>
<a href="{% url 'editar_tipo_almacen' data.pk %}"><span class="glyphicon glyphicon-file">Editar </span></a>
<a href="{% url 'eliminar_tipo_almacen' data.pk %}"><span class="glyphicon glyphicon-trash">Borrar </span></a>
</td>
</tr>
{% endfor %}
</tbody>
tipo_almacen_confirm_delete.html:
{% extends "main.html" %}
{% block contenido %}
<form action="" method="post">{% csrf_token %}
<p>Quieres eliminar "{{ object }}"</p>
<input type="submit" value="Confirmar" />
</form>
{% endblock %}
Waiting for your collaboration