Welcome | Get started | Dive into Lino | Contribute | Topics | Reference | More
publisher
: render database content as styled html¶
The lino.modlib.publisher
plugin deserves better documentation.
It doesn't add any database model, but a choicelist, a model mixin and an
action. It also adds a printing build method
(lino.modlib.printing.BuildMethods
).
This page is a tested document and the following instructions are used for initialization:
>>> from lino import startup
>>> startup('lino_book.projects.cms1.settings')
>>> from lino.api.doctest import *
Classes¶
- class lino.modlib.publisher.PublisherBuildMethod¶
This deserves better documentation.
- class lino.modlib.publisher.Publishable¶
This deserves better documentation.
- class lino.modlib.publisher.PreviewPublication¶
This deserves better documentation.
Configuration¶
- publisher.locations¶
A tuple of 2-tuples (loc, cls) where loc is a location string and cls a data view.
>>> pprint(dd.plugins.publisher.locations) (('b', lino_xl.lib.blogs.models.LatestEntries), ('p', lino_xl.lib.pages.ui.Pages), ('r', lino.modlib.uploads.models.Uploads), ('s', lino_xl.lib.sources.models.Sources), ('t', lino_xl.lib.topics.models.Topics), ('u', lino.modlib.users.ui.Users))
When setting this setting (usually in a
get_plugin_configs()
method), the application developer should specify the data views using their names. The above locations have been set inlino_cms.lib.cms.settings
as follows:yield ('publisher', 'locations', ( ('b', 'blogs.LatestEntries'), ('p', 'pages.Pages'), ('t', 'topics.Topics'), ('u', 'users.Users')))