def index(): assigned_task = [] author_tasks = [] author_projects = [] if session.get('logged_in', None): username = session['username'] assigned_task = list(Task.view('tasks/by_assigned', key = username)) author_tasks = list(Task.view('tasks/by_author', key = username)) author_projects = list(Project.view('projects/by_author', key = username)) return render_template('index.html', assigned_tasks = assigned_task, \ author_tasks = author_tasks, author_projects = author_projects)
def index(): assigned_task = [] author_tasks = [] author_projects = [] if session.get('logged_in', None): username = session['username'] assigned_task = list(Task.view('tasks/by_assigned', key=username)) author_tasks = list(Task.view('tasks/by_author', key=username)) author_projects = list(Project.view('projects/by_author', key=username)) return render_template('index.html', assigned_tasks = assigned_task, \ author_tasks = author_tasks, author_projects = author_projects)
def show(id): if not g.db.doc_exist(id): abort(404) errors = [] project = Project.get(id) tasks = list(Task.view('tasks/by_project', key=project.title)) ''' fpath = os.path.join(UPLOADED_FILES, id) files = None if os.path.exists(fpath): files = os.listdir(fpath) ''' return render_template('project_show.html', \ project = project, tasks = split_by_priority(tasks), errors = errors)
def show(id): if not g.db.doc_exist(id): abort(404) errors = [] project = Project.get(id) tasks = list(Task.view('tasks/by_project', key = project.title)) ''' fpath = os.path.join(UPLOADED_FILES, id) files = None if os.path.exists(fpath): files = os.listdir(fpath) ''' return render_template('project_show.html', \ project = project, tasks = split_by_priority(tasks), errors = errors)