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:
parent
acd91931ec
commit
35da9ad193
8 changed files with 34 additions and 34 deletions
|
@ -2,7 +2,7 @@ import time
|
|||
import json
|
||||
from django.http import HttpResponse, HttpResponseRedirect
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.shortcuts import render
|
||||
from django.shortcuts import render, get_object_or_404
|
||||
from computes.models import Compute
|
||||
from instances.models import Instance
|
||||
from accounts.models import UserInstance
|
||||
|
@ -143,7 +143,7 @@ def overview(request, compute_id):
|
|||
return HttpResponseRedirect(reverse('index'))
|
||||
|
||||
error_messages = []
|
||||
compute = Compute.objects.get(id=compute_id)
|
||||
compute = get_object_or_404(Compute, pk=compute_id)
|
||||
|
||||
try:
|
||||
conn = wvmHostDetails(compute.hostname,
|
||||
|
@ -172,7 +172,7 @@ def compute_graph(request, compute_id):
|
|||
points = 5
|
||||
datasets = {}
|
||||
cookies = {}
|
||||
compute = Compute.objects.get(id=compute_id)
|
||||
compute = get_object_or_404(Compute, pk=compute_id)
|
||||
curent_time = time.strftime("%H:%M:%S")
|
||||
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue