Coverage for portality/view/dashboard.py: 100%

15 statements  

« prev     ^ index     » next       coverage.py v6.4.2, created at 2022-07-19 18:38 +0100

1from flask import Blueprint 

2from flask import render_template 

3from flask_login import current_user, login_required 

4 

5from portality import models 

6from portality.decorators import ssl_required 

7from portality.bll import DOAJ 

8 

9from portality.core import app 

10 

11# ~~Dashboard:Blueprint~~ 

12blueprint = Blueprint('dashboard', __name__) 

13 

14 

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")) 

22 

23 # ~~-> Dashboard:Page~~ 

24 return render_template('dashboard/index.html', todos=todos)