Skip to content

Querying data

Thane Thomson edited this page Feb 1, 2017 · 1 revision

Since Statik allows for you to specify your own data model and data, you'll naturally need a way to query that data. Queries are parsed and executed after parsing your views, but just before templates are processed to produce the final static web site.

Queries can be supplied in two places:

  • Your project's configuration file (config.yml). These queries are executed only once and are made available throughout all of your templates.
  • Your views. These queries are executed once for each relevant view, and the results of these queries are only available within the relevant view's template.

Queries can also be supplied using two different kinds of syntax:

  • Raw Python and SQLAlchemy queries.
  • MLAlchemy queries.

(TBC)

Clone this wiki locally