1

I've setup a database, populated it with data manually for the sake of simplicity, created and set up a jinja template, so my Clojure in Lumminus is working. But how can I actually select data from my db and pass into the template? I have no idea and here http://www.luminusweb.net/docs/guestbook.md#accessing_the_database it's not explained clearly, it just says what I'm able to and not to do.

So how can I actually retrieve data from the db and display it on an html page? Could anyone help me?

On my html page I have this:

  {% for article in articles %}
    Title is: {{article.title}}
  {% endfor %}
  • Keep reading the tutorial. [Creating Pages and Handling Form Input](http://www.luminusweb.net/docs/guestbook.md#creating_pages_and_handling_form_input) shows how the `home-page` function calls `layout/render` and passes in `db/get-messages`. – Curtis Summers May 16 '16 at 11:34
  • @CurtisSummers, but not how "db/get-messages" is implemented. –  May 16 '16 at 11:47
  • `get-messages` is generated for you based on the special comments in your SQL file for the given SQL query. See [Working with HugSQL](http://www.luminusweb.net/docs/database.md#working_with_hugsql) for a quick overview and [HugSQL](http://hugsql.org) for full documentation. – Curtis Summers May 16 '16 at 11:51

0 Answers0