Add file selector to snapshots
This commit is contained in:
parent
996f6a9f18
commit
e11749f187
6 changed files with 76 additions and 5 deletions
|
@ -154,9 +154,11 @@ def snapshot(request, uuid=None):
|
|||
_snapshot = Snapshot.objects.get(id=uuid)
|
||||
except Snapshot.DoesNotExist:
|
||||
_snapshot = Snapshot(id=uuid)
|
||||
_form = SnapshotForm(request.POST, instance=_snapshot)
|
||||
_form = SnapshotForm(request.POST, request.FILES, instance=_snapshot)
|
||||
if _form.is_valid():
|
||||
_form.save()
|
||||
return redirect(snapshot, uuid=uuid)
|
||||
|
||||
context = {
|
||||
"snapshot": _snapshot,
|
||||
"form": _form,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue