Skip to content

Instantly share code, notes, and snippets.

@erwan
Last active August 29, 2015 14:07
Show Gist options
  • Save erwan/88098ee61f2f982ae9d6 to your computer and use it in GitHub Desktop.
Save erwan/88098ee61f2f982ae9d6 to your computer and use it in GitHub Desktop.
api = prismic.get('https://lesbonneschoses.prismic.io/api')
response = api.form('everything')\
.ref(api.get_master())\
.query(predicates.at("document.type", "product"))\
.pageSize(100)\
.orderings('[my.product.price desc]')\
.submit()
# The products are now ordered by price, highest first
results = response.results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment