Coverage for portality/view/dashboard.py: 100%
15 statements
« prev ^ index » next coverage.py v6.4.2, created at 2022-11-09 15:10 +0000
« prev ^ index » next coverage.py v6.4.2, created at 2022-11-09 15:10 +0000
1from flask import Blueprint
2from flask import render_template
3from flask_login import current_user, login_required
5from portality import models
6from portality.decorators import ssl_required
7from portality.bll import DOAJ
9from portality.core import app
11# ~~Dashboard:Blueprint~~
12blueprint = Blueprint('dashboard', __name__)
15@blueprint.route('/')
16@login_required
17@ssl_required
18def top_todo():
19 # ~~-> Todo:Service~~
20 svc = DOAJ.todoService()
21 todos = svc.top_todo(current_user._get_current_object(), size=app.config.get("TODO_LIST_SIZE"))
23 # ~~-> Dashboard:Page~~
24 return render_template('dashboard/index.html', todos=todos)