|
|
|
@ -5,7 +5,7 @@ This is the main Flask application for https://tree.st
|
|
|
|
|
""" |
|
|
|
|
|
|
|
|
|
(import [flask [Flask redirect render-template request session url-for]]) |
|
|
|
|
(import [blog [retrieve-posts verify-post-name]]) |
|
|
|
|
(import [blog [retrieve-posts valid-post-name?]]) |
|
|
|
|
|
|
|
|
|
(setv app (Flask __name__)) |
|
|
|
|
|
|
|
|
@ -45,9 +45,9 @@ This is the main Flask application for https://tree.st
|
|
|
|
|
:posts (retrieve-posts post-name) |
|
|
|
|
:type "blog")] |
|
|
|
|
;; post-name is checked to be None here as opposed to |
|
|
|
|
;; in verify-post-name so that the regular case (rendering |
|
|
|
|
;; in valid-post-name? so that the regular case (rendering |
|
|
|
|
;; the blog feed) has a slightly lower overhead. |
|
|
|
|
[(or (none? post-name) (verify-post-name post-name)) |
|
|
|
|
[(or (none? post-name) (valid-post-name? post-name)) |
|
|
|
|
(render-template "blog.html" |
|
|
|
|
:posts (retrieve-posts post-name) |
|
|
|
|
:type "blog")] |
|
|
|
|