Skip to main content

Library to provide a predicate dispatch for Django’s generic views.

Requirements

  • Python 2.7 or later (not support 3.x)

  • Django 1.4 or later

Features

Using this, You can create views call method in considering of value returned by predicate. For example folloing view calls method in considering of request parameter:

class PonyView(PredicateProcessView):
    dispatch_config = (
                          ('get_corn_1', (RequestParamPredicate('corn=1'),)),
                          ('get_corn', (RequestParamPredicate('corn'),)),
                      )
    def get_corn(self, request, *args, **kwargs):
        return HttpResponse('pony with some corn')

    def get_corn_1(self, request, *args, **kwargs):
        return HttpResponse('pony with unicorn')

    def get_default(self, request, *args, **kwargs):
        return HttpResponse('pony')

In this case, It used:

  • beautifulpredicates.views.PredicateProcessView

  • beautifulpredicates.predicates.RequestParamPredicate

History

0.0.1 (2012-01-13)

  • first release

Metadata

Release files for django-beautifulpredicates 0.0.1

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

Source distribution (sdist)

Source distribution for django-beautifulpredicates 0.0.1
File Size Uploaded Provenance Actions
django-beautifulpredicates-0.0.1.tar.gz 2.8 kB Without provenance Details for django-beautifulpredicates-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-beautifulpredicates 0.0.1
File Interpreter ABI Platform Actions
django_beautifulpredicates-0.0.1-py2.7.egg Legacy Egg format - - Details for django_beautifulpredicates-0.0.1-py2.7.egg

Total release size: 10.9 kB

Release files / django-beautifulpredicates-0.0.1.tar.gz

Download URL django-beautifulpredicates-0.0.1.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
6f3edb22bcff7f5995a93187eb5ce7ffcf0fdc0b8a8b138b095674b4910a83e7
BLAKE2b-256 checksum
How to use checksums
c383eda30163c4de7a919b768280cb4f12c6b2acfa282731c7a8d7f3fdd42716
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / django_beautifulpredicates-0.0.1-py2.7.egg

Download URL django_beautifulpredicates-0.0.1-py2.7.egg
Size 8.2 kB
Tags Egg
SHA-256 checksum
How to use checksums
99bd3884beb76a85546028eb7f0c53eef57c6bd14c2d7102df17fbd6a9f7e6a1
BLAKE2b-256 checksum
How to use checksums
da987fd85a8f39fe776991727500937069830731958454f2f40bcf2921f477b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-beautifulpredicates 0.0.1

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.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

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