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

Class ContentTypeManager

source code

db.models.Manager --+
                    |
                   ContentTypeManager

Instance Methods [hide private]
 
get_for_model(self, model)
Returns the ContentType object for the given model, creating the ContentType if necessary.
source code
 
clear_cache(self)
Clear out the content-type cache.
source code
Method Details [hide private]

clear_cache(self)

source code 

Clear out the content-type cache. This needs to happen during database flushes to prevent caching of "stale" content type IDs (see django.contrib.contenttypes.management.update_contenttypes for where this gets called).