]> git.datanom.net - liogui.git/blob - webapp/dashboard.py
Completed User Administration
[liogui.git] / webapp / dashboard.py
1 from flask import (
2 Blueprint, flash, g, redirect, render_template, session, request, url_for
3 )
4 from werkzeug.exceptions import abort
5
6 from webapp.auth import login_required
7 from webapp.db import get_db
8
9 bp = Blueprint('dashboard', __name__)
10
11 @bp.route('/')
12 @login_required
13 def index():
14 """db = get_db()
15 posts = db.execute(
16 'SELECT p.id, title, body, created, author_id, username'
17 ' FROM post p JOIN user u ON p.author_id = u.id'
18 ' ORDER BY created DESC'
19 ).fetchall()"""
20 return render_template('dashboard/index.html', perm=session.get('user_perm'))
21
This page took 0.43841 seconds and 6 git commands to generate.