Beispiel #1
0
    def get(self, page=1):
        if current_user.is_sper == True:
            task = []
            task.append(
                Task.query.filter_by(status=False).order_by('-id').all())
        else:
            task = []
            id = []
            for project in current_user.quanxians:
                if (project.projects.id in id) == False:
                    task.append(
                        Task.query.filter_by(prject=project.projects.id,
                                             status=False).all())
                    id.append(project.projects.id)

        old_yask = hebinglist(task)
        projects_lsit = fenye_list(Ob_list=old_yask, split=PageShow)
        pages = range(1, len(projects_lsit) + 1)
        try:
            pyth_post1 = projects_lsit[int(page) - 1]
            return render_template('home/timingtask.html',
                                   inte=pyth_post1,
                                   pages=pages)
        except:
            return redirect(url_for('home.timingtask'))
Beispiel #2
0
 def get(self, page=1):
     if current_user.is_sper == True:
         events = []
         events.append(
             Interfacehuan.query.filter_by(
                 status=False).order_by('-id').all())
     else:
         events = []
         id = []
         for project in current_user.quanxians:
             if (project.projects.id in id) == False:
                 events.append(
                     Interfacehuan.query.filter_by(
                         project=project.projects.id,
                         status=False).order_by('-id').all())
                 id.append(project.projects.id)
     projects_lsit = fenye_list(Ob_list=events, split=PageShow)
     pages = range(1, len(projects_lsit) + 1)
     if current_user.is_sper == True:
         projects = Project.query.filter_by(
             status=False).order_by('-id').all()
     else:
         projects = []
         for i in current_user.quanxians:
             if (i.projects in i) == False:
                 projects.append(i.projects)
     try:
         pyth_post1 = projects_lsit[int(page) - 1]
         return render_template('home/events.html',
                                events=pyth_post1,
                                pages=pages,
                                projects=projects)
     except:
         return redirect(url_for('home.ceshihuanjing'))
Beispiel #3
0
 def get(self,page=1):
     models=Model.query.filter_by(status=False).order_by('-id').all()
     projects_lsit = fenye_list(Ob_list=models, split=PageShow)
     pages = range(1, len(projects_lsit) + 1)
     try:
         pyth_post1 = projects_lsit[int(page) - 1]
         return  render_template('home/model.html', projects=pyth_post1,pages=pages)
     except:
         return redirect(url_for('home.model'))
Beispiel #4
0
 def get(self, page=1):
     genconfiglist = GeneralConfiguration.query.filter_by(status=False).order_by('-id').all()
     projects_lsit = fenye_list(Ob_list=genconfiglist, split=PageShow)
     pages = range(1, len(projects_lsit) + 1)
     try:
         pyth_post1 = projects_lsit[int(page) - 1]
         return render_template('home/genconfig.html', inte=pyth_post1, pages=pages)
     except:
         return redirect(url_for('home.genconfig'))
Beispiel #5
0
 def get(self, page=1):
     if current_user.is_sper == True:
         project_list = Project.query.filter_by(status=False).all()
     else:
         project_list = []
         for projec in current_user.quanxians:
             project_list.append(projec.projects)
     models = Model.query.filter_by(status=False).all()
     projects_lsit = fenye_list(Ob_list=models, split=PageShow)
     pages = range(1, len(projects_lsit) + 1)
     pyth_post1 = projects_lsit[int(page) - 1]
     return render_template('home/model.html', projects=pyth_post1, pages=pages, project_list=project_list)
Beispiel #6
0
 def get(self,page=1):
     if current_user.is_sper == True:
         project=Project.query.filter_by(status=False).all()
     else:
         project=[]
         for projec in current_user.quanxians:
             project.append(projec.projects)
     projects_lsit = fenye_list(Ob_list=project, split=PageShow)
     pages = range(1, len(projects_lsit) + 1)
     try:
         pyth_post1 = projects_lsit[int(page) - 1]
         return render_template('home/test_result.html', projects=pyth_post1,pages=pages)
     except:
         return redirect(url_for('home.test_rep'))
Beispiel #7
0
 def get(self,page=1):
     if current_user.is_sper == True:
         projects=Project.query.filter_by(status=False).order_by('-id').all()
     else:
         projects=[]
         id=[]
         for i in current_user.quanxians:
             if  i.projects in id==False:
                 if i.projects.status ==False:
                     projects.append(i.projects)
                     id.append(i.projects)
     projects_lsit=fenye_list(Ob_list=projects,split=PageShow)
     pages = range(1, len(projects_lsit) + 1)
     try:
         pyth_post1 = projects_lsit[int(page) - 1]
         return  render_template('home/project.html', projects=pyth_post1,pages=pages)
     except:
         return redirect(url_for('home.project'))