fukamachi / ningle

Super micro framework for Common Lisp
http://8arrow.org/ningle/
273 stars 25 forks source link

how to use cl-who or djula with ningle #18

Closed arademaker closed 7 years ago

arademaker commented 7 years ago

The (djula:render-template ... ) needs a stream as parameter, how to capture the stream to write the template output?

fukamachi commented 7 years ago

Look at with-output-to-stream.

arademaker commented 7 years ago

Hum, not clear if I understood your comment. Anyway, I was able to produce the output directly with

(setf (ningle:route *app* "/hello/:name")
      #'(lambda (params)
      (djula:render-template* +base.html+ nil
                  :title (cdr (assoc :name params))
                  :message "teste")))