Back to index

plone3  3.1.7
postonly.py
Go to the documentation of this file.
00001 from ZPublisher.HTTPRequest import HTTPRequest
00002 from zExceptions import Forbidden
00003 
00004 
00005 def check(request):
00006     if isinstance(request, HTTPRequest):
00007         if request.get('REQUEST_METHOD', 'GET').upper() != 'POST':
00008             raise Forbidden('Request must be POST')