Show user's task on /attract
This commit is contained in:
@@ -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():
|
||||
|
Reference in New Issue
Block a user