def open_web(): ''' ()-->None open the django web UI ''' config = server.configuration()['server'] webbrowser.open(format('http://%s:%i/admin' % (config['ip_address'], config['port'])))
def close(): ''' ()-->None allow using python connect to CMD and run the sh script to close the django server ''' config = server.configuration()['server'] server.stop_server(config['port']) showinfo("Notice", "Server off!")
def run(): ''' ()-->None allow using python connect to CMD and run the sh script to open the django server ''' config = server.configuration()['server'] server.run_server(config['ip_address'], config['port']) showinfo("Notice", "Server on!")