org.pdf.ticket
Classes
Generates QR Codes |
|
A PDF document. |
|
A PDF document. |
Module Contents
- class org.pdf.ticket.TicketQrCode(payload: str | bytes, border: int | None = None, box_size: int | None = None, fill_color: str | None = None, back_color: str | None = None, img_format: str | None = None, encoding: Literal['base64'] | None = None)[source]
Bases:
onegov.qrcode.QrCodeGenerates QR Codes
- class org.pdf.ticket.TicketPdf(*args: Any, **kwargs: Any)[source]
Bases:
onegov.org.pdf.core.OrgPdfA PDF document.
- property page_fn: collections.abc.Callable[[reportlab.pdfgen.canvas.Canvas, onegov.pdf.templates.Template], None][source]
First page the same as later except Qr-Code.
- ticket_summary(html: str | None, linkify: bool = True) None[source]
A copy of the mini_html adapted for ticket summary. We have to guarantee some backwards compatibility here whenever we change the templates and thereby the snapshot of tickets.
Must work for templates: - directory_entry_submission - display_event - display_form - reservations
- ticket_timeline(msg_feed: collections.abc.Mapping[str, Any] | None) None[source]
Will parse the timeline from view_messages_feed
- static extract_feed_info(html: str) list[str | None] | None[source]
Must be able to parse templates message_{message.type}.pt and return the useful data in cleaned form.
- add_ticket(ticket: onegov.ticket.Ticket, request: onegov.org.request.OrgRequest) None[source]
Adds a ticket to the story.
- classmethod from_ticket(request: onegov.org.request.OrgRequest, ticket: onegov.ticket.Ticket) io.BytesIO[source]
Creates a PDF representation of the ticket. It is sensible to the templates used to render the message feed and the summary of the ticket coming from ticket handler. With this approach, snapshotted summaries are supported.
- class org.pdf.ticket.TicketsPdf(*args: Any, **kwargs: Any)[source]
Bases:
TicketPdfA PDF document.
- filter_info(form: onegov.org.forms.TicketInvoiceSearchForm, request: onegov.org.request.OrgRequest) None[source]
- classmethod from_tickets(request: onegov.org.request.OrgRequest, tickets: collections.abc.Collection[onegov.ticket.Ticket], form: onegov.org.forms.TicketInvoiceSearchForm | None = None) io.BytesIO[source]
Creates a PDF representation of the tickets. It is sensible to the templates used to render the message feed and the summary of the ticket coming from ticket handler. With this approach, snapshotted summaries are supported.