Update admin script => template

This commit is contained in:
wqy
2022-09-02 20:28:37 +08:00
parent 71c454c8cf
commit 99958a24ca
2 changed files with 5 additions and 6 deletions

View File

@@ -1,6 +0,0 @@
from tjnetwork_admin import *
if __name__ == "__main__":
if (have_template()):
delete_template()
create_template()

View File

@@ -95,3 +95,8 @@ def delete_template():
with pg.connect(conninfo="dbname=postgres", autocommit=True) as conn:
with conn.cursor() as cur:
cur.execute("drop database project")
if __name__ == "__main__":
if (have_template()):
delete_template()
create_template()