Curso-lenguaje-python/python-total/dia_16/mi_web/src/proyecto/base/views.py
Manuel Vergara 33e2f1b72f Update day 16
Signed-off-by: Manuel Vergara <manuel@vergaracarmona.es>
2023-05-21 19:21:17 +02:00

18 lines
399 B
Python

from django.shortcuts import render
from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from .models import Tarea
# Create your views here.
class ListaPendientes(ListView):
model = Tarea
context_object_name = 'tareas'
class DetalleTarea(DetailView):
model = Tarea
context_object_name = 'tarea'
template_name = 'base/tarea.html'