Skip to main content
this is dirty implementation.

## how to use

- define selectable renderer.
- using selectable renderer as renderer factory
- using selectable renderer with view_config settings

### sample

## define selectable renderer
from pyramid_selectable_renderer import SelectableRendererSetup
from pyramid_selectable_renderer.custom import ReceiveTemplatePathCandidatesDict
from pyramid_selectable_renderer.custom import SelectByRetvalLeftGen

ValidateTrueOrNot = SelectableRendererSetup(
ReceiveTemplatePathCandidatesDict,
SelectByRetvalLeftGen.generate(lambda x : x),
renderer_name = "validate_true_or_not")

## in __init__.py
def includeme(config):
ValidateTrueOrNot.register_to(config) # enable to use selectable renderer

## in view.py
@view_config(route_name="sample.confirm",
renderer=ValidateTrueOrNot({True: "foo:success.pt", False: "foo:failure.pt"}))
def form_confirm_view(context, request):
form = ValidateForm(request.POST):
return form.validate(), {"form": form}

Metadata

Release files for pyramid_selectable_renderer 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyramid_selectable_renderer 0.0.4
File Size Uploaded Provenance Actions
pyramid_selectable_renderer-0.0.4.tar.gz 4.0 kB Without provenance Details for pyramid_selectable_renderer-0.0.4.tar.gz

Release files / pyramid_selectable_renderer-0.0.4.tar.gz

Download URL pyramid_selectable_renderer-0.0.4.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
8f18a5e163adb725fdc54659a547cd58a23c15ab79305573b011c20d15af7e76
BLAKE2b-256 checksum
How to use checksums
424996a5e4cebed89bb40b9a1dbdd8ffc30e4e894e9ca21966646cb4df0fba52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for pyramid_selectable_renderer 0.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page