fix and clean create view
This commit is contained in:
parent
3adbc44cff
commit
46e1f42961
@ -51,7 +51,6 @@ def details(request, deployment_id):
|
|||||||
return HttpResponseServerError(e)
|
return HttpResponseServerError(e)
|
||||||
return HttpResponseRedirect("/deployment")
|
return HttpResponseRedirect("/deployment")
|
||||||
|
|
||||||
deployment = get_object_or_404(Deployment, id=deployment_id)
|
|
||||||
return render(request, "deployment/details.html", {"deployment": deployment})
|
return render(request, "deployment/details.html", {"deployment": deployment})
|
||||||
|
|
||||||
|
|
||||||
@ -66,7 +65,6 @@ def create(request):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
return HttpResponseServerError(e)
|
return HttpResponseServerError(e)
|
||||||
return HttpResponseRedirect("/deployment")
|
return HttpResponseRedirect("/deployment")
|
||||||
else:
|
|
||||||
form = DeploymentForm
|
|
||||||
|
|
||||||
|
form = DeploymentForm()
|
||||||
return render(request, "deployment/create.html", {"form": form})
|
return render(request, "deployment/create.html", {"form": form})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user