def load_lang(self, langpath): h = Helper() if not h.langexists(langpath): Logging.log('Can\'t define language to show, exiting...', LogLevel.DANGER) exit(-1) else: self.langbuf = lang_from_path(langpath) if not isinstance(self.langbuf, dict): Logging.log('- Error loading language file', LogLevel.DANGER) exit(-1) Logging.log( h.formatter(h.getlang(self.langbuf, 'header', None), [h.version(), h.gettime()]), LogLevel.CLI)
def dashboard(): h = Helper() return render_template('dashboard.html', version=h.version())