Commit 68fc5e3c authored by Guillaume Mella's avatar Guillaume Mella
Browse files

improve reliability so we always give validated stars to jinja

parent 4ed95c81
#from pyramid.response import Response
from pyramid.view import view_config
#from sqlalchemy.exc import DBAPIError
from jmdc_app.models.star_info import StarInfo
from jmdc_app.models.submission import StarInfoEntry
@view_config(route_name='jmdc_catalog', renderer='../templates/jmdc_catalog.jinja2')
def jmdc_home(request):
session = request.dbsession
# order by id (creation order / look during import )
stars = session.query(StarInfo).order_by(
stars = session.query(StarInfo).filter(StarInfo.star_info_entry.any(StarInfoEntry.validated==True)).order_by(
return { 'stars': stars }
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment