Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More

cms (main plugin for Lino CMS)

In Lino CMS this plugin defines the locale directory for all translations.

Side note: Code snippets (lines starting with >>>) in this document get tested as part of our development workflow. The following initialization snippet tells you which demo project is being used in this document.

>>> import lino
>>> lino.startup('lino_book.projects.cms1.settings')
>>> from lino.api.doctest import *

A test failure said that in cms1 there are 0 (on GL) instead of 6 checkdata errors (on my machine). That’s why we’d like to see these messages:

>>> rt.show(checkdata.Messages)
... 
No data to display
>>> obj = blogs.Entry.objects.get(id=2)
>>> obj.body_short_preview
... 
'<a href="/admin/#/api/uploads/Uploads/15" target="_blank"><img
src="/media/thumbs/uploads/2022/09/crossroads.jpg"
style="padding:4px; float:left; height:30ex" title="Crossroads, Kilham West Field -
geograph.org.uk - 2097672"/></a>Let\'s choose one or the other of the either roads
(or NOT)!\n\nAnd the hesitation, does it comes rarely(?), Nooo!, we are very
frequently and suddenly put to situations where we must choose between
roads.\n\nOf course, how to choose and what to choose are the questions. But did
we ever ask \'why?\' But of c...'