Ticket #11267: queries_by_attr_name_1.patch

File queries_by_attr_name_1.patch, 608 bytes (added by dstora, 15 years ago)

Patch 1

  • django/db/models/options.py

     
    329329            cache[f.name] = (f, model, True, True)
    330330        for f, model in self.get_fields_with_model():
    331331            cache[f.name] = (f, model, True, False)
     332            if f.attname != f.name:
     333                cache[f.attname] = (f, model, True, False)
    332334        if self.order_with_respect_to:
    333335            cache['_order'] = OrderWrt(), None, True, False
    334336        if app_cache_ready():
Back to Top