21 lines
440 B
Python
21 lines
440 B
Python
from flask import Blueprint, render_template
|
|
from flask_login import login_required, current_user
|
|
|
|
main = Blueprint('main', __name__)
|
|
|
|
|
|
@main.route('/')
|
|
def index():
|
|
return render_template('index.html')
|
|
|
|
|
|
@main.route('/profile')
|
|
@login_required
|
|
def profile():
|
|
return render_template(
|
|
'profile.html',
|
|
name=current_user.name,
|
|
google_id=current_user.google_id,
|
|
is_admin=current_user.administrator
|
|
)
|