Package web :: Package web :: Module webapi :: Class Redirect
[hide private]
[frames] | no frames]

Class Redirect

source code

              object --+            
                       |            
exceptions.BaseException --+        
                           |        
        exceptions.Exception --+    
                               |    
                       HTTPError --+
                                   |
                                  Redirect
Known Subclasses:

A `301 Moved Permanently` redirect.

Instance Methods [hide private]
 
__init__(self, url, status='301 Moved Permanently', absolute=False)
Returns a `status` redirect to the new URL.
source code

Inherited from exceptions.Exception: __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __str__, __unicode__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from exceptions.BaseException: args, message

Inherited from object: __class__

Method Details [hide private]

__init__(self, url, status='301 Moved Permanently', absolute=False)
(Constructor)

source code 

Returns a `status` redirect to the new URL. `url` is joined with the base URL so that things like `redirect("about") will work properly.

Overrides: object.__init__