<s> from __future__ import unicode_literals <EOL> import collections <EOL> from django . views . decorators import http <EOL> from . . import core <EOL> __all__ = ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , ) <EOL> class RequireGET ( core . http . HttpMethodDeny ) : <EOL> """<STR_LIT>""" <EOL> http_method_names = ( "<STR_LIT>" , ) <EOL> class RequirePOST ( core . http . HttpMethodDeny ) : <EOL> """<STR_LIT>""" <EOL> http_method_names = ( "<STR_LIT>" , ) <EOL> class RequireSafe ( core . http . HttpMethodDeny ) : <EOL> """<STR_LIT>""" <EOL> http_method_names = ( "<STR_LIT>" , "<STR_LIT>" , ) <EOL> class Condition ( core . http . HttpMethodAllow ) : <EOL> """<STR_LIT>""" <EOL> condition_etag = None <EOL> condition_last_modified = None <EOL> def get_allow_handler ( self ) : <EOL> """<STR_LIT>""" <EOL> allow = super ( Condition , self ) . get_allow_handler ( ) <EOL> if ( isinstance ( self . condition_etag , collections . Callable ) or <EOL> isinstance ( self . condition_last_modified , collections . Callable ) ) : <EOL> allow = http . condition ( <EOL> etag_func = self . condition_etag , <EOL> last_modified_func = self . condition_last_modified ) ( allow ) <EOL> return allow </s>
