forked from Fediversity/Fediversity
cleanup debugmess in views.py
This commit is contained in:
parent
bc44d7fe05
commit
caef7e737e
1 changed files with 0 additions and 13 deletions
|
@ -1,7 +1,6 @@
|
|||
from enum import Enum
|
||||
import json
|
||||
import subprocess
|
||||
import threading
|
||||
import os
|
||||
|
||||
from django.urls import reverse_lazy
|
||||
|
@ -10,13 +9,8 @@ from django.contrib.auth.models import User
|
|||
from django.views.generic import TemplateView, DetailView
|
||||
from django.views.generic.edit import FormView
|
||||
|
||||
|
||||
from time import sleep
|
||||
|
||||
from panel import models
|
||||
from panel.configuration import forms
|
||||
|
||||
|
||||
class Index(TemplateView):
|
||||
template_name = 'index.html'
|
||||
|
||||
|
@ -95,10 +89,6 @@ class ConfigurationForm(LoginRequiredMixin, FormView):
|
|||
obj.value = form.to_python().model_dump_json()
|
||||
obj.save()
|
||||
|
||||
print('-------------debug-------------')
|
||||
print(self.request.POST)
|
||||
print('-------------debug-------------')
|
||||
|
||||
if "deploy" in self.request.POST.keys():
|
||||
#threading.Thread(target=self.run_deployment, args=(obj,)).start()
|
||||
print("DEPLOYING:")
|
||||
|
@ -131,9 +121,6 @@ class ConfigurationForm(LoginRequiredMixin, FormView):
|
|||
"apply",
|
||||
"test",
|
||||
]
|
||||
# print('start deployment')
|
||||
# sleep(10)
|
||||
# print('done with deployment')
|
||||
subprocess.run(cmd, cwd=os.getenv("REPO_DIR") or f"{os.getcwd()}/..", env=env)
|
||||
|
||||
return super().form_valid(form)
|
||||
|
|
Loading…
Add table
Reference in a new issue