20 lines
522 B
Python
20 lines
522 B
Python
import functools
|
|
|
|
from flask import(
|
|
Blueprint, flash, g, redirect, render_template, request, session, url_for
|
|
)
|
|
from werkzeug.exceptions import abort
|
|
|
|
from flaskfdx.auth import login_required
|
|
from flaskfdx.db import get_db
|
|
|
|
bp = Blueprint('dashboard', __name__)
|
|
|
|
bp.route('/')
|
|
def index():
|
|
db = get_db()
|
|
lastseven = db.execute(
|
|
'SELECT * FROM total WHERE datetime(date) > datetime("now", "-8 days")'
|
|
).fetchall()
|
|
return render_template('dashboard/index.html', lastseven=lastseven)
|