46 lines
1.3 KiB
Python
46 lines
1.3 KiB
Python
from django.utils.translation import gettext_lazy as _
|
|
from django.views.generic.base import TemplateView
|
|
from django.urls import reverse_lazy
|
|
from django.views.generic.edit import (
|
|
CreateView,
|
|
UpdateView,
|
|
FormView,
|
|
)
|
|
|
|
from dashboard.mixins import DashboardView
|
|
from evidence.models import Evidence, Annotation
|
|
# from snapshot.forms import UploadForm
|
|
# from django.shortcuts import render
|
|
# from rest_framework import viewsets
|
|
# from snapshot.serializers import SnapshotSerializer
|
|
|
|
|
|
# class SnapshotViewSet(viewsets.ModelViewSet):
|
|
# queryset = Snapshot.objects.all()
|
|
# serializer_class = SnapshotSerializer
|
|
|
|
|
|
class ListEvidencesView(DashboardView, TemplateView):
|
|
template_name = "evidences.html"
|
|
section = "evidences"
|
|
title = _("Evidences")
|
|
breadcrumb = "Evidences"
|
|
|
|
def get_context_data(self, **kwargs):
|
|
context = super().get_context_data(**kwargs)
|
|
# evidences = Evidence.objects.filter(owner=self.request.user)
|
|
evidences = []
|
|
context.update({
|
|
'evidences': evidences,
|
|
})
|
|
return context
|
|
|
|
|
|
# class UploadView(DashboardView, FormView):
|
|
# template_name = "upload.html"
|
|
# section = "snapshots"
|
|
# title = _("Upload Snapshot")
|
|
# breadcrumb = "Snapshots / Upload"
|
|
# success_url = reverse_lazy('snashot:list')
|
|
# form_class = UploadForm
|