瀏覽代碼

get book relationships for home page showcase

joel
Simon Bowie 1 年之前
父節點
當前提交
d97b36bd0c
共有 2 個檔案被更改,包括 4 行新增1 行删除
  1. +3
    -1
      web/app/main.py
  2. +1
    -0
      web/app/templates/index.html

+ 3
- 1
web/app/main.py 查看文件

@@ -10,6 +10,7 @@ from flask import Blueprint, render_template
from flask_login import login_required, current_user
from .models import Resource
from .resources import *
from .relationships import *
from sqlalchemy.sql import func
import markdown

@@ -23,7 +24,8 @@ def index():
text = f.read()
text = markdown.markdown(text)
book_showcase = get_book('69')
return render_template('index.html', text=text, tools=tools, book=book_showcase)
book_showcase_relationships = get_relationships('69')
return render_template('index.html', text=text, tools=tools, book=book_showcase, book_relationships=book_showcase_relationships)

# route for profile page
@main.route('/profile')

+ 1
- 0
web/app/templates/index.html 查看文件

@@ -1,6 +1,7 @@
{% extends "base.html" %}

{% block content %}
{{book_relationships}}
<div class="std-grid">

<div class="std-margin text row-span-2 cell meta">

Loading…
取消
儲存