Update admin script => template
This commit is contained in:
@@ -1,6 +0,0 @@
|
|||||||
from tjnetwork_admin import *
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
if (have_template()):
|
|
||||||
delete_template()
|
|
||||||
create_template()
|
|
||||||
@@ -95,3 +95,8 @@ def delete_template():
|
|||||||
with pg.connect(conninfo="dbname=postgres", autocommit=True) as conn:
|
with pg.connect(conninfo="dbname=postgres", autocommit=True) as conn:
|
||||||
with conn.cursor() as cur:
|
with conn.cursor() as cur:
|
||||||
cur.execute("drop database project")
|
cur.execute("drop database project")
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
if (have_template()):
|
||||||
|
delete_template()
|
||||||
|
create_template()
|
||||||
Reference in New Issue
Block a user