No me muestra el contenido de detail view, simplemente se muestra el título "Detalle evento de limpieza en calendario".
models.py
class EventTankCleaning(models.Model):
installation_TankCleaning = models.ForeignKey(Installation,on_delete=models.CASCADE,null=True, blank=True)
startdatetime_TankCleaning = models.DateField('Fecha y hora de comienzo de limpieza', null=True, blank=True)
observations_TankCleaning = models.TextField('Observaciones', null=True, blank=True)
class Meta:
verbose_name = 'Añadir limpieza de tanque'
verbose_name = 'Añadir limpiezas de tanques'
def __str__(self):
return str(self.installation_TankCleaning)
urls.py
path(
'detail_eventTankCleaning/<pk>/',
views.DetailEventTankCleaning.as_view(),
name='detail_eventTankCleaning',
),
view.py
class DetailEventTankCleaning(LoginRequiredMixin,DetailView):
model = EventTankCleaning
template_name = "cleaning/detail_cleaning.html"
login_url = reverse_lazy('users_app:user-login')
detail_cleaning.html
div class="container">
<div class="row">
<div class="offset-lg-0 col-2"></div>
<div class="col-lg-12 col-md-8">
<div class="alert border m-3 bg-light" role="alert">
<h3 class="text-dark">Detalle evento de limpieza en calendario</h3>
{{ installation_TankCleaning }}
{{ startdatetime_TankCleaning }}
{{ observations_TankCleaning }}
</div>
</div>
<div class="offser-lg-0 col-2"></div>
</div>
</div>