atmo.news
The code base to show the “News” section to users.
atmo.news.views
-
class
atmo.news.views.
News
[source]
Encapsulate the rendering of the news document NEWS.md
.
-
ast
Return (and cache for repeated querying) the Markdown AST
of the NEWS.md
file.
-
current
(request)[source]
Return the latest seen version or nothing.
-
latest
Return the latest version found in the NEWS.md
file.
-
render
()[source]
Render the NEWS.md
file as a HTML.
-
update
(request, response)[source]
Set the cookie for the given request with the latest seen version.
-
uptodate
(request)[source]
Return whether the current is newer than the last seen version.
-
atmo.news.views.
check_news
(request)[source]
View to check if the current user has seen the latest “News” section
and return either ‘ok’ or ‘meh’ as a string.
-
atmo.news.views.
list_news
(request)[source]
View to list all news and optionally render only part of the
template for AJAX requests.