calingen.contrib.layouts.simple_event_list
¶
Implementation of LayoutProvider
that provides TeX-sources for a simple list of events.
Submodules¶
Package Contents¶
Classes¶
The actual implementation of the layout. |
Attributes¶
The path to the app's default configuration class. |
- class calingen.contrib.layouts.simple_event_list.SimpleEventList¶
Bases:
calingen.interfaces.plugin_api.LayoutProvider
The actual implementation of the layout.
Nothing fancy here,
prepare_context()
is just used to group the providedcalingen.interfaces.data_exchange.CalendarEntryList
by month.Warning
The provided templates create a document targeted at German users. You may override the templates to (fully) support other languages.
Notes
To customize the generated TeX-sources, the following templates may be overridden:
simple_event_list/tex/base.tex
: Speaking in TeX-terms: the preamble of the document, including package definitions.simple_event_list/tex/simple_event_list.tex
: Speaking in TeX-terms: the document’s body.simple_event_list/tex/single_entry_line.tex
: The actual TeX-representation of acalingen.interfaces.data_exchange.CalendarEntry
.
- _template = simple_event_list/tex/simple_event_list.tex¶
- layout_type = tex¶
- name = Simple Event List¶
- orientation = portrait¶
- paper_size = a4¶
- classmethod prepare_context(context)¶
Pre-process the
entries
to group them by month.
- calingen.contrib.layouts.simple_event_list.default_app_config = calingen.contrib.layouts.simple_event_list.apps.CalingenLayoutSimpleEventListConfig¶
The path to the app’s default configuration class.
Consider this legacy code. See Django’s documentation for details.
Notes
While the layout is provided as a “standalone Django app”, it is in fact nothing more than an implementation of
LayoutProvider
. The actual magic of registering the layout with the main app is not done in this app’sAppConfig
, but in this very file by importing theSimpleEventList
class.