feature/90-implement-public-website-for-device #17

Merged
cayop merged 32 commits from feature/90-implement-public-website-for-device into main 2024-10-30 15:02:18 +00:00
1 changed files with 1 additions and 6 deletions
Showing only changes of commit 2636e80ece - Show all commits

View File

@ -110,11 +110,8 @@ class DetailsView(DashboardView, TemplateView):
return context return context
class DeviceWebView(DashboardView, TemplateView): class DeviceWebView(TemplateView):
template_name = "device_web.html" template_name = "device_web.html"
title = _("Device Website")
breadcrumb = "Device / Public"
model = Annotation
def get(self, request, *args, **kwargs): def get(self, request, *args, **kwargs):
self.pk = kwargs['pk'] self.pk = kwargs['pk']
@ -124,11 +121,9 @@ class DeviceWebView(DashboardView, TemplateView):
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs) context = super().get_context_data(**kwargs)
self.object.initial() self.object.initial()
lot_tags = LotTag.objects.filter(owner=self.request.user.institution)
context.update({ context.update({
'object': self.object, 'object': self.object,
'snapshot': self.object.get_last_evidence(), 'snapshot': self.object.get_last_evidence(),
'lot_tags': lot_tags,
}) })
return context return context