1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-07-31 12:41:08 +00:00

Added 404 and fixed urls

This commit is contained in:
Retspen 2015-04-02 15:39:40 +03:00
parent acd91931ec
commit 35da9ad193
8 changed files with 34 additions and 34 deletions

View file

@ -1,4 +1,4 @@
from django.shortcuts import render
from django.shortcuts import render, get_object_or_404
from django.http import HttpResponseRedirect
from django.utils.translation import ugettext_lazy as _
from django.core.urlresolvers import reverse
@ -29,7 +29,7 @@ def create_instance(request, compute_id):
networks = []
meta_prealloc = False
computes = Compute.objects.all()
compute = Compute.objects.get(id=compute_id)
compute = get_object_or_404(Compute, pk=compute_id)
flavors = Flavor.objects.filter().order_by('id')
try: