Skip to main content

Pyramid renderer for TDOM.

Project description

This is a simple implementation of a Pyramid IRenderer which renders “TDOM Compatible” Template objects with the tdom library.

Usage

# in main() or subsequent includeme
config.include('pyramid_tdom')

# view callable returns `Template` directly
def welcome_view(request):
    title = "Welcome to TDOM!"
    heading = "Welcome to TDOM!"
    return t'<!doctype html><html><body><head><title>{title}</title><meta chartset="utf8"></head><body><h1>{heading}</h1></body></html>'

config.add_route("welcome", "/welcome")

# set renderer via add_view or dynamically with `@view_config(renderer="tdom")`
config.add_view(welcome_view, route_name="welcome", renderer="tdom", request_method="GET")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyramid_tdom-0.1a0-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file pyramid_tdom-0.1a0-py3-none-any.whl.

File metadata

  • Download URL: pyramid_tdom-0.1a0-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for pyramid_tdom-0.1a0-py3-none-any.whl
Algorithm Hash digest
SHA256 f4d1847ac272b8eefc0c744a9574a4a6ddd8c1b63b59f7d894d57977717fbebd
MD5 15b5b324fcf47c07bea0ae24865e03db
BLAKE2b-256 c5384a7a4d4e891cd3cda0746fbea8410ce2eecd6f4f5ba8070919b3534d51d7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page