Closed rosner closed 10 years ago
You are absolutely right. I generally prefer having a context_object_name
set to make it easier to comprehend the object(s) you are working with in the templates. I've changed the dashboard views and renamed the context_object_name
for the views to fancypage
or fancypage_list
to avoid clashes with pagination objects on list pages (we had that issue before). Does that fix your issue?
Hey,
the PageDeleteView does not have set the
context_object_name
topage
but the templatepage_delete.html
usespage
as the context variable. This raises an Exception in rendering the breadcrumbs in the delete page becausepage.pk
is referenced but there is no page object in the context. Quick fix would be to set thecontext_object_name
in the PageDeleteView.Also not all dashboard views do have
context_object_name
set. Is this on purpose? Would you rather usecontext_object_name
or stay with default django behaviour (object
andobject_list
).What do you think @elbaschid ?. I can come up with a PR.
Also in the delete template there are properties used that the default FancyPage model doesn't have - like
title
.