Show more than just paintings on property page
This commit is contained in:
parent
c649179caf
commit
0ef6eced13
5
app.py
5
app.py
|
@ -163,7 +163,10 @@ def property_query_page(property_id):
|
||||||
sort = request.args.get('sort')
|
sort = request.args.get('sort')
|
||||||
sort_by_name = sort and sort.lower().strip() == 'name'
|
sort_by_name = sort and sort.lower().strip() == 'name'
|
||||||
|
|
||||||
q = render_template('query/property.sparql', pid=pid)
|
q = render_template('query/property.sparql',
|
||||||
|
pid=pid,
|
||||||
|
isa_list=isa_list)
|
||||||
|
|
||||||
rows = wdqs.run_query_with_cache(q, name=pid)
|
rows = wdqs.run_query_with_cache(q, name=pid)
|
||||||
|
|
||||||
no_label_qid = [row['object']['value'].rpartition('/')[2]
|
no_label_qid = [row['object']['value'].rpartition('/')[2]
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
select ?object ?objectLabel ?objectDescription (count(*) as ?count) {
|
select ?object ?objectLabel ?objectDescription (count(*) as ?count) {
|
||||||
?item wdt:P31 wd:Q3305213 .
|
values ?isa { {% for isa in isa_list %} wd:{{ isa }} {% endfor %} }
|
||||||
|
|
||||||
|
?item wdt:P31 ?isa .
|
||||||
?item wdt:P18 ?image .
|
?item wdt:P18 ?image .
|
||||||
?item wdt:{{ pid }} ?object .
|
?item wdt:{{ pid }} ?object .
|
||||||
optional {
|
optional {
|
||||||
|
|
Loading…
Reference in a new issue