Ticket #10738: deferred_model_contenttype.2.diff

File deferred_model_contenttype.2.diff, 571 bytes (added by tomasz.elendt, 6 years ago)
  • django/contrib/contenttypes/models.py

     
    1414        ContentType if necessary. Lookups are cached so that subsequent lookups
    1515        for the same model don't hit the database.
    1616        """
     17        if model._deferred:
     18            model = model._meta.proxy_for_model
    1719        opts = model._meta
    1820        key = (opts.app_label, opts.object_name.lower())
    1921        try:
Back to Top