def tablets(self): out = open(c_config.web_sites("tablets.txt")).read() out = self.alltablets.inserttablets(out) out = out.replace( '{Match=""}', '{Match="' + self.eventDal.get_current_match() + '"}') return out
def index(self): out = open(s_config.web_sites("view.html")).read() if self.alone: out = out.replace('{Back}', '') else: out = out.replace('{Back}', '<h3><a href="/">Scouting Director</a></h3>') out = out.replace('{Match}', event.EventDal.get_current_match()) return out
def setup(self): """Returns Scouting System setup page. Allows user to set event and contains links for server directions, entering the schedule manually, setting up a new database, and backing up data. Returns: (str) HTML text """ out = open(c_config.web_sites("setup.html")).read() out = out.replace('{Event}', self.eventDal.get_current_event()[1]) out = out.replace('{Year}', self.eventDal.get_current_event()[2]) return out
def index(self): """Returns Scouting System start page. Start page displays current match and event, allows user to set current match, displays a table showing tablet pages, and includes links to other scouting system pages. Returns: (str) HTML text """ out = open(c_config.web_sites("admin.html")).read() out = out.replace('{Match}', self.eventDal.get_current_match()) out = out.replace('{Event}', self.eventDal.get_current_event()[1]) out = out.replace('{Year}', self.eventDal.get_current_event()[2]) return out
def index(self): return open(s_config.web_sites("resetView.html"))
def restore(self, path): self.export.run_restore(path) return open(s_config.web_sites("reset.html")).read()
def eventcurrent(self, event, year): print("/n=====", event, year, "=====") self.eventDal.set_current_event(event, year) return open(c_config.web_sites("reset.html")).read()
def eventfind(self, event, year): self.eventDal.set_current_event(event, year) self.eventDal.set_current_match('001-q') core.data_access.schedule.insert_sched(event, year, 'qual') return open(c_config.web_sites("reset.html")).read()
def matchcurrent(self, match): self.tablet('TestSystem:Reset') self.eventDal.set_current_match(match) return open(c_config.web_sites("reset.html")).read()
def databaseset(self): core.data_access.setup.setup() return open(c_config.web_sites("reset.html")).read()