https://github.com/moriyoshi/pyramid_exclusive_request_methods
https://github.com/moriyoshi/pyramid_exclusive_request_methods
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/moriyoshi/pyramid_exclusive_request_methods
- Owner: moriyoshi
- License: bsd-3-clause
- Created: 2016-11-13T02:54:14.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-07-03T17:09:59.000Z (almost 8 years ago)
- Last Synced: 2025-03-07T02:49:07.604Z (2 months ago)
- Language: Python
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.txt
- Changelog: CHANGES.txt
- License: LICENSE.txt
Awesome Lists containing this project
README
.. contents::
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):
passc = Configurator(...)
c.includeme('pyramid_exclusive_request_methods')