Beispiel #1
0
 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
Beispiel #2
0
    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
Beispiel #3
0
    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
Beispiel #4
0
    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
Beispiel #5
0
 def index(self):
     return open(s_config.web_sites("resetView.html"))
Beispiel #6
0
 def restore(self, path):
     self.export.run_restore(path)
     return open(s_config.web_sites("reset.html")).read()
Beispiel #7
0
 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()
Beispiel #8
0
 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()
Beispiel #9
0
 def matchcurrent(self, match):
     self.tablet('TestSystem:Reset')
     self.eventDal.set_current_match(match)
     return open(c_config.web_sites("reset.html")).read()
Beispiel #10
0
 def databaseset(self):
     core.data_access.setup.setup()
     return open(c_config.web_sites("reset.html")).read()