Show user's task on /attract

This commit is contained in:
2016-10-05 11:51:07 +02:00
parent 426635cc45
commit bf35b0a9b7
5 changed files with 41 additions and 31 deletions

View File

@@ -2,18 +2,28 @@ import functools
import logging
from flask import Blueprint, render_template
import flask_login
from pillar.api.utils import jsonify
from pillar.web.system_util import pillar_api
import pillarsdk
from attract import current_attract
blueprint = Blueprint('attract', __name__)
log = logging.getLogger(__name__)
@blueprint.route('/')
def index():
return render_template('attract/index.html')
user = flask_login.current_user
if user.is_authenticated:
tasks = current_attract.task_manager.tasks_for_user(user.objectid)
else:
tasks = None
return render_template('attract/index.html',
tasks=tasks)
def error_project_not_setup_for_attract():