Explorar el Código

get book relationships for home page showcase

joel
Simon Bowie hace 1 año
padre
commit
d97b36bd0c
Se han modificado 2 ficheros con 4 adiciones y 1 borrados
  1. +3
    -1
      web/app/main.py
  2. +1
    -0
      web/app/templates/index.html

+ 3
- 1
web/app/main.py Ver fichero

@@ -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 Ver fichero

@@ -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">

Cargando…
Cancelar
Guardar