#NEWLINE# def __init__( self , allowed_methods , **kwargs ) : #NEWLINE# #INDENT# new_headers = { #NEWLINE# #INDENT# 'Allow' : ', ' . join ( self ) , #NEWLINE# #UNINDENT# } #NEWLINE# super ( HTTPMethodNotAllowed , self ) . __init__ ( status . HTTP_405 , ** kwargs ) #NEWLINE# if ( not self . headers ) : #NEWLINE# #INDENT# self . headers = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# self . headers . update ( new_headers )