Package django :: Package contrib :: Package contenttypes :: Module generic :: Class GenericForeignKey
[hide private]
[frames] | no frames]

Class GenericForeignKey

source code

object --+
         |
        GenericForeignKey

Provides a generic relation to any object through content-type/object-id fields.

Instance Methods [hide private]
 
__init__(self, ct_field="content_type", fk_field="object_id")
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
contribute_to_class(self, cls, name) source code
 
instance_pre_init(self, signal, sender, args, kwargs)
Handles initializing an object with the generic FK instaed of content-type/object-id fields.
source code
 
get_content_type(self, obj=None, id=None) source code
 
__get__(self, instance, instance_type=None) source code
 
__set__(self, instance, value) source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, ct_field="content_type", fk_field="object_id")
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)