Exemplo n.º 1
0
 def get_context_data(self, **kwargs):
     context = DeleteView.get_context_data(self, **kwargs)
     if self.breadcrumbs:
         context['breadcrumbs'] = []
         for breadcrumb in self.breadcrumbs:
             if 'title' not in breadcrumb:
                 breadcrumb['title'] = self.object
             context['breadcrumbs'].append({
                 'href': reverse(breadcrumb['viewname']),
                 'title': breadcrumb['title']
             })
         context['breadcrumbs'].append({
             'href': self.object.get_absolute_url(),
             'title': self.object
         })
         context['breadcrumbs'].append({
             'href': self.request.path,
             'title': 'Update'
         })
     return context
Exemplo n.º 2
0
 def get_context_data(self, **kwargs):
     context = DeleteView.get_context_data(self, **kwargs)
     if self.breadcrumbs:
         context['breadcrumbs'] = []
         for breadcrumb in self.breadcrumbs:
             if 'title' not in breadcrumb:
                 breadcrumb['title'] = self.object
             context['breadcrumbs'].append({
                 'href':
                 reverse(breadcrumb['viewname']),
                 'title':
                 breadcrumb['title']
             })
         context['breadcrumbs'].append({
             'href':
             self.object.get_absolute_url(),
             'title':
             self.object
         })
         context['breadcrumbs'].append({
             'href': self.request.path,
             'title': 'Update'
         })
     return context