|
|
|
|
|
|
|
|
from flask import Blueprint, render_template |
|
|
from flask import Blueprint, render_template |
|
|
from flask_login import login_required, current_user |
|
|
from flask_login import login_required, current_user |
|
|
from .models import Resource |
|
|
from .models import Resource |
|
|
|
|
|
from .resources import * |
|
|
from sqlalchemy.sql import func |
|
|
from sqlalchemy.sql import func |
|
|
import markdown |
|
|
import markdown |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
with open('content/home.md', 'r') as f: |
|
|
with open('content/home.md', 'r') as f: |
|
|
text = f.read() |
|
|
text = f.read() |
|
|
text = markdown.markdown(text) |
|
|
text = markdown.markdown(text) |
|
|
return render_template('index.html', text=text, tools=tools) |
|
|
|
|
|
|
|
|
book_showcase = get_book('69') |
|
|
|
|
|
return render_template('index.html', text=text, tools=tools, book=book_showcase) |
|
|
|
|
|
|
|
|
# route for profile page |
|
|
# route for profile page |
|
|
@main.route('/profile') |
|
|
@main.route('/profile') |