Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

No project description provided

Project description

Introduction

pyramid_exclusive_request_methods enables one to add a view config whose view handles all the HTTP request methods and responds with 405 Method Not Allowed for the request methods not explicitly specified in the configuration.

Synopsis:

from pyramid_exclusive_request_methods import exclusive_view_config

@view_config(route_name='foo', request_method=['GET'])
def foo(context, request):
    pass

@exclusive_view_config(route_name='bar', request_method='GET')
def bar(context, request):
    pass

c = Configurator(...)
c.includeme('pyramid_exclusive_request_methods')

Contributors

Moriyoshi Koizumi <mozo@mozo.jp>

Changelog

0.0.0

  • Initial upload to pypi.

0.0.1

  • Switch to add_exclusive_view directive and exclusive_view_config decorator style, because Exclusively marker doesn’t work as expected due to the limitation of Pyramid.

0.0.2

  • Bump due to the packaging failure.

0.0.3

  • Fix a bug that it doesn’t work with view classes.

0.0.4

  • Fix a bug that it doesn’t work with view_defaults.

0.0.5

  • Fix a bug that it doesn’t work when the views forms a multiview.

0.0.6

  • Fix for Pyramid 1.8

0.0.7

  • Fix a bug that it doesn’t work when the different route is specified to each attribute of a view class in the view config.

Project details


Download files

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

Files for pyramid-exclusive-request-methods, version 0.0.7
Filename, size File type Python version Upload date Hashes
Filename, size pyramid_exclusive_request_methods-0.0.7-py2.py3-none-any.whl (7.1 kB) File type Wheel Python version 3.5 Upload date Hashes View hashes
Filename, size pyramid_exclusive_request_methods-0.0.7.tar.gz (5.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page