浏览代码

inverting practices exclusion method

practices
Simon Bowie 1年前
父节点
当前提交
6620aae2d3
共有 2 个文件被更改,包括 9 次插入15 次删除
  1. +8
    -14
      web/app/practice.py
  2. +1
    -1
      web/content/colophon.md

+ 8
- 14
web/app/practice.py 查看文件

@@ -15,7 +15,7 @@ from . import db
import os
import markdown
from sqlalchemy.sql import func
from sqlalchemy import or_
from sqlalchemy import or_, not_

practice = Blueprint('practice', __name__)

@@ -37,19 +37,13 @@ def get_practices():
practices_query = Resource.query.filter_by(type=resource_type)

# temporarily removing incomplete practices from main list
practices_query = Resource.query.filter(
or_(
Resource.id==53,
Resource.id==56,
Resource.id==57,
Resource.id==59,
Resource.id==61,
Resource.id==62,
Resource.id==63,
Resource.id==64,
Resource.id==65,
Resource.id==66
))
practices_query = practices_query.filter(
not_(or_(
Resource.id==52,
Resource.id==54,
Resource.id==55,
Resource.id==58
)))

# finalise the query and add pagination
practices = practices_query.order_by(Resource.name).paginate(page=page, per_page=25)

+ 1
- 1
web/content/colophon.md 查看文件

@@ -6,7 +6,7 @@ Back-end coding by [Simon Bowie](https://simonxix.com), front-end coding by [Joe

Special thanks to Gary Hall, Rebekka Kiesewetter, Marcell Mars, Toby Steiner, and Samuel Moore, and everyone who has provided feedback on our research or shared suggestions of examples to feature, including the participants of COPIM’s experimental publishing workshop, and Nicolás Arata, Dominique Babini, Maria Fernanda Pampin, Sebastian Nordhoff, Abel Packer, and Armanda Ramalho, and Agatha Morka.

Our appreciation also goes out to the [Next Generation Library Publishing Project](https://educopia.org/next-generation-library-publishing/) for sharing an early catalogue-in-progress version of [SComCat](https://www.scomcat.net/) with us, which formed one of the inspirations behind the Compendium.
Our appreciation also goes out to the [Next Generation Library Publishing Project](https://educopia.org/next-generation-library-publishing/) for sharing an early catalogue-in-progress version of [SComCat](https://www.scomcat.net/) with us which formed one of the inspirations behind the Compendium.
___

Copyright © 2023 [COPIM](https://copim.ac.uk/).

正在加载...
取消
保存