Package django :: Package contrib :: Package contenttypes :: Module models :: Class ContentType
[hide private]
[frames] | no frames]

Class ContentType

source code

db.models.Model --+
                  |
                 ContentType

Nested Classes [hide private]
  Meta
Instance Methods [hide private]
 
__unicode__(self) source code
 
model_class(self)
Returns the Python model class for this type of content.
source code
 
get_object_for_this_type(self, **kwargs)
Returns an object of this type for the keyword arguments given.
source code
Class Variables [hide private]
  name = models.CharField(max_length= 100)
  app_label = models.CharField(max_length= 100)
  model = models.CharField(_('python model class name'), max_len...
  objects = ContentTypeManager()
Method Details [hide private]

get_object_for_this_type(self, **kwargs)

source code 

Returns an object of this type for the keyword arguments given. Basically, this is a proxy around this object_type's get_object() model method. The ObjectNotExist exception, if thrown, will not be caught, so code that calls this method should catch it.


Class Variable Details [hide private]

model

Value:
models.CharField(_('python model class name'), max_length= 100)