def launch_load_report(file: str, location: str = None): from supplychainpy.reporting import load launcher = tk.Tk() app_launch = SupplychainpyReporting(launcher) if location is not None: load.load(file, location) else: load.load(file) app_launch.parent.configure(background='black') launcher.mainloop()
def load_db(file: str, location: str = None): from supplychainpy.reporting import load if location is not None and os.name in ['posix', 'mac']: app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///{}/reporting.db'.format(location) elif location is not None and os.name == 'nt': app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///{}\\reporting.db'.format(location) db.create_all() if location is not None: load.load(file, location) else: load.load(file)
def load_db(file: str, location: str = None): from supplychainpy.reporting import load app = create_app() if location is not None and os.name in ['posix', 'mac']: app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///{}/reporting.db'.format(location) elif location is not None and os.name == 'nt': app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///{}\\reporting.db'.format(location) db.create_all() if location is not None: load.load(file, location) else: load.load(file)
def launch_load_report(file: str, location: str = None): from supplychainpy.reporting import load if location is not None and os.name in ['posix', 'mac']: app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///{}/reporting.db'.format(location) elif location is not None and os.name == 'nt': app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///{}\\reporting.db'.format(location) db.create_all() if location is not None: load.load(file, location) else: load.load(file) launcher = tk.Tk() app_launch = SupplychainpyReporting(launcher) app_launch.parent.configure(background='black') launcher.mainloop()