Browse Source

get book relationships for home page showcase

joel
Simon Bowie 1 year ago
parent
commit
d97b36bd0c
2 changed files with 4 additions and 1 deletions
  1. +3
    -1
      web/app/main.py
  2. +1
    -0
      web/app/templates/index.html

+ 3
- 1
web/app/main.py View File

@@ -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 View File

@@ -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…
Cancel
Save