This commit is contained in:
lulzette 2021-03-24 19:37:58 +00:00
parent d4347513f1
commit 8ec2b2be1d

View File

@ -10,12 +10,10 @@ def listVDS():
VdsListVar.append(i)
return VdsListVar
# Главная страница
@route('/')
def index():
# return template('index.html')
# return 'Привет, мир!'
return listVDS()
return str(listVDS())
@get('/action') # or @route('/login')
@ -26,7 +24,8 @@ def login():
Action (start/stop): <br>
<input type="radio" name="act" value="start"> Start<Br>
<input type="radio" name="act" value="stop"> Stop<Br>
<input type="radio" name="act" value="destroy"> destroy<Br>
<input value="Name" type="submit" />
</form>
'''
@ -43,6 +42,9 @@ def do_action():
elif (act == "stop"):
dom.shutdown()
return "<p>Stopped</p> <button href='action'>"
elif (act == "destroy"):
dom.destroy()
return "<p>Stopped</p> <button href='action'>"
else:
return "Error"