Memento

class anyblok_attachment_jinja.bloks.jinja.ReportBlok(registry)

Bases: anyblok.blok.Blok

Add attachment in AnyBlok

author = 'Suzanne Jean-Sébastien'
conditional_by = []
conflicting_by = []
classmethod import_declaration_module()

Do the python import for the Declaration of the model or other

name = 'report-jinja'
optional_by = []
classmethod reload_declaration_module(reload)
required = ['report', 'wkhtml2pdf']
required_by = []
version = '1.0.0'

API doc

Template

class anyblok_attachment_jinja.bloks.jinja.template.Template

Bases: object

AnyBlok registration:

  • Type: Model
  • Registry name: Model.Attachment.Template
  • Tablename: attachment_template

Template Jinja

class anyblok_attachment_jinja.bloks.jinja.template.Jinja

Bases: anyblok.mixin.WkHtml2Pdf, anyblok.model.Template

Jinja templating

AnyBlok registration:

  • Type: Model
  • Registry name: Model.Attachment.Template.Jinja
  • Tablename: attachment_template_jinja
  • Inherited Models or Mixins:
    • anyblok.mixin.WkHtml2Pdf
    • anyblok.model.Template
Fields  
uuid
  • Type - anyblok.column.UUID
  • primary_key - True
  • nullable - False
  • foreign_key - Model.Attachment.Template => uuid
  • default - anyblok.column.NoDefaultValue
  • binary - False
  • native - None
jinja_paths
  • Type - anyblok.column.Text
  • nullable - False
  • default - anyblok.column.NoDefaultValue
contenttype
  • Type - anyblok.column.Selection
  • nullable - False
  • default - 'application/pdf'
  • size - 64
options
  • Type - anyblok.column.Json
  • nullable - False
wkhtml2pdf_configuration
  • Type - anyblok.relationship.Many2One
  • model - Model.Attachment.WkHtml2Pdf
  • index - False

Parser

class anyblok_attachment_jinja.bloks.jinja.parser.Parser

Bases: object

AnyBlok registration:

  • Type: Model
  • Registry name: Model.Attachment.Parser
  • Tablename: attachment_parser
classmethod serialize_jinja_options(options)

Serialize only the options for jinja render

Exceptions

exception anyblok_attachment_jinja.bloks.jinja.exceptions.TemplateJinjaException

Template Jinjaxception