Package turbogears :: Package identity :: Module conditions :: Class from_host

Class from_host

source code

             object --+    
                      |    
              Predicate --+
                          |
             object --+   |
                      |   |
IdentityPredicateHelper --+
                          |
                         from_host

Predicate for checking whether the visitor's host is a permitted host.

Note: We never want to announce what the list of allowed hosts is, because it is way too easy to spoof an IP address in a TCP/IP packet.

Instance Methods
 
__init__(self, host)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
eval_with_object(self, obj, errors=None)
Match the visitor's host against the criteria.
source code

Inherited from Predicate: append_error_message

Inherited from IdentityPredicateHelper: __nonzero__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  error_message = "Access from this host is not permitted."
Properties

Inherited from object: __class__

Method Details

__init__(self, host)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

eval_with_object(self, obj, errors=None)

source code 

Match the visitor's host against the criteria.

Overrides: Predicate.eval_with_object