示例#1
0
    def get(self):
        confFile = weioConfig.getConfiguration()
        firstTimeSwitch = confFile['first_time_run']

        if (firstTimeSwitch == "YES"):
            self.redirect("/signin")
            # Create symlinks to external projects
            weioFiles.symlinkExternalProjects()
            return

        if (confFile["login_required"] == "YES"):
            if not self.current_user:
                self.redirect("/login")
                return

        path = confFile['editor_html_path']
        self.render(path, error="")
示例#2
0
    def get(self):
        confFile = weioConfig.getConfiguration()
        firstTimeSwitch = confFile['first_time_run']

        if (firstTimeSwitch=="YES") :
            self.redirect("/signin")
            # Create symlinks to external projects
            weioFiles.symlinkExternalProjects()
            return

        if (confFile["login_required"] == "YES"):
            if not self.current_user:
                self.redirect("/login")
                return

        path = confFile['editor_html_path']
        self.render(path, error="")
示例#3
0
            # go to ap
        elif (state == "sta"):
            pass
            # go to sta

if __name__ == '__main__':
    # Take configuration from conf file and use it to define parameters
    global confFile
    global firstTimeSwitch
    global wifiButtons
    global wifiPeriodicCheck

    confFile = weioConfig.getConfiguration()
    
    # Create symlinks to external projects
    weioFiles.symlinkExternalProjects()

    # put absolut path in conf, needed for local testing on PC
    confFile['absolut_root_path'] = os.path.abspath(".")
    weioConfig.saveConfiguration(confFile)
    firstTimeSwitch = confFile['first_time_run']


    import logging
    logging.getLogger().setLevel(logging.DEBUG)


    ###
    # Routers
    ###
    # EDITOR ROUTES
示例#4
0
            pass
            # go to ap
        elif (state == "sta"):
            pass
            # go to sta


if __name__ == '__main__':
    # Take configuration from conf file and use it to define parameters
    global wifiButtons
    global wifiPeriodicCheck

    confFile = weioConfig.getConfiguration()

    # Create symlinks to external projects
    weioFiles.symlinkExternalProjects()

    # put absolut path in conf, needed for local testing on PC
    confFile['absolut_root_path'] = os.path.abspath(".")
    weioConfig.saveConfiguration(confFile)
    firstTimeSwitch = confFile['first_time_run']

    import logging
    logging.getLogger().setLevel(logging.DEBUG)

    ###
    # Routers
    ###
    # EDITOR ROUTES
    WeioEditorRouter = SockJSRouter(editorHandler.WeioEditorHandler,
                                    '/editorSocket')