diff --git a/api/views.py b/api/views.py index d79f8e638..75215e71c 100644 --- a/api/views.py +++ b/api/views.py @@ -220,16 +220,17 @@ def deleteWebsite(request): json_data = json.dumps(data_ret) return HttpResponse(json_data) - numberOfWebsites = str(Websites.objects.count() + ChildDomains.objects.count()) - - ## Deleting master domain - website = Websites.objects.get(domain=websiteName) websiteOwner = website.admin if admin.websites_set.all().count() == 0: websiteOwner.delete() + ## Deleting master domain + + numberOfWebsites = str(Websites.objects.count() + ChildDomains.objects.count()) + + execPath = "sudo python " + virtualHostUtilities.cyberPanel + "/plogical/virtualHostUtilities.py" execPath = execPath + " deleteVirtualHostConfigurations --virtualHostName " + websiteName + \ @@ -246,7 +247,6 @@ def deleteWebsite(request): json_data = json.dumps(data_ret) return HttpResponse(json_data) - def submitWebsiteStatus(request): try: if request.method == 'POST': diff --git a/baseTemplate/templates/baseTemplate/index.html b/baseTemplate/templates/baseTemplate/index.html index 336769932..96393f6a7 100755 --- a/baseTemplate/templates/baseTemplate/index.html +++ b/baseTemplate/templates/baseTemplate/index.html @@ -390,6 +390,7 @@