Progress with component handling
This commit is contained in:
@@ -392,7 +392,20 @@ class ComponentDetailView(LoginRequiredMixin, BaseTemplateMixin, DetailView):
|
||||
context = super().get_context_data(**kwargs)
|
||||
context['component'] = self.object
|
||||
|
||||
|
||||
|
||||
|
||||
return context
|
||||
|
||||
class PackageDetailView(LoginRequiredMixin, BaseTemplateMixin, DetailView):
|
||||
template_name = 'parts/packages-detail.html'
|
||||
model = Package
|
||||
pk_url_kwarg = 'uuid'
|
||||
base_title = ''
|
||||
navbar_selected = 'Components'
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
self.base_title = 'Package / '+self.object.name
|
||||
context = super().get_context_data(**kwargs)
|
||||
context['package'] = self.object
|
||||
|
||||
return context
|
||||
|
Reference in New Issue
Block a user