upload form
This commit is contained in:
parent
e2f9855954
commit
9cdea3c45f
|
@ -1,7 +1,11 @@
|
|||
from django.utils.translation import gettext_lazy as _
|
||||
from django.views.generic.base import TemplateView
|
||||
from django.views.generic.edit import FormView
|
||||
from django.urls import reverse_lazy
|
||||
|
||||
from dashboard.mixins import DashboardView
|
||||
from snapshot.models import Snapshot
|
||||
from snapshot.forms import UploadForm
|
||||
# from django.shortcuts import render
|
||||
# from rest_framework import viewsets
|
||||
# from snapshot.serializers import SnapshotSerializer
|
||||
|
@ -25,3 +29,12 @@ class ListSnapshotsView(DashboardView, TemplateView):
|
|||
'snapshots': snapshots,
|
||||
})
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue