calingen.contrib.layouts.lineatur.lineatur
¶
LayoutProvider
implementation for various ruled paper outputs.
More or less all of this module’s source code is utility code, that is tied
together in LineaturForm
and actually used in the layout’s templates.
This may seem like a lot of boilerplate (and it is, in fact), but it
demonstrates an easy way to actually implement
the LayoutProvider’s ability to provide a layout specific configuration
as implemented by
calingen.interfaces.plugin_api.LayoutProvider.configuration_form
.
Module Contents¶
Classes¶
Where to put the caption. |
|
Pre-defined colors to use in the generated output. |
|
Provide CSS absolute length units. |
|
Provide different kinds of ruled paper. |
|
Configuration form for the Lineatur layout. |
|
Provide different types of grids. |
|
Provide choices for the paper sizes. |
- class calingen.contrib.layouts.lineatur.lineatur.CaptionPositionChoices¶
Bases:
django.db.models.TextChoices
Where to put the caption.
- CENTER¶
- LEFT¶
- RIGHT¶
- class calingen.contrib.layouts.lineatur.lineatur.ColorChoices¶
Bases:
django.db.models.TextChoices
Pre-defined colors to use in the generated output.
- BLACK¶
- BLUE¶
- DARK_GREY¶
- GREEN¶
- LIGHT_GREY¶
- RED¶
- class calingen.contrib.layouts.lineatur.lineatur.LengthUnits¶
Bases:
django.db.models.TextChoices
Provide CSS absolute length units.
Taken from here: https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units#lengths
- CM¶
- IN¶
- MM¶
- PT¶
- PX¶
- class calingen.contrib.layouts.lineatur.lineatur.Lineatur¶
Bases:
calingen.interfaces.plugin_api.LayoutProvider
Provide different kinds of ruled paper.
The term lineatur can be translated (loosely) to ruled paper. It describes the lines or grids on paper, usually used for notes.
- _template = lineatur/layout.html¶
- configuration_form¶
- layout_type = html¶
- name = Lineatur¶
- orientation = portrait¶
- paper_size = various¶
- class calingen.contrib.layouts.lineatur.lineatur.LineaturForm(*args, request=None, **kwargs)¶
Bases:
calingen.forms.generation.LayoutConfigurationForm
Configuration form for the Lineatur layout.
This is actually a subclass of
calingen.forms.generation.LayoutConfigurationForm
and exposes some options to adjust the generated page, e.g. the format of the paper, margins and the actual grid.- length_unit¶
- lineatur_color¶
- lineatur_spacing_x¶
- lineatur_spacing_y¶
- lineatur_stroke_width¶
- lineatur_type¶
- page_margin_bottom¶
- page_margin_left¶
- page_margin_right¶
- page_margin_top¶
- paper_size¶
- template_name = lineatur/config_form.html¶