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  
wkhtml2pdf_configuration
  • model - Model.Attachment.WkHtml2Pdf
  • index - False
  • Type - anyblok.relationship.Many2One
uuid
  • default - anyblok.column.NoDefaultValue
  • native - None
  • nullable - False
  • foreign_key - Model.Attachment.Template => uuid
  • primary_key - True
  • binary - False
  • Type - anyblok.column.UUID
options
  • nullable - False
  • Type - anyblok.column.Json
jinja_paths
  • default - anyblok.column.NoDefaultValue
  • nullable - False
  • Type - anyblok.column.Text
contenttype
  • default - 'application/pdf'
  • nullable - False
  • size - 64
  • Type - anyblok.column.Selection

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