Changes between Version 117 and Version 118 of RemovingTheMagic


Ignore:
Timestamp:
Apr 27, 2006, 10:40:24 AM (18 years ago)
Author:
maney at two14 period net
Comment:

m2m naming clash pointed out

Legend:

Unmodified
Added
Removed
Modified
  • RemovingTheMagic

    v117 v118  
    584584Note that related-object lookup uses the default manager of the related object, which means the API for accessing related objects is completely consistent with the API for accessing objects via a manager.
    585585
     586(This example, while probably representative of the way an existing model would look, introduces an unfortunate asymmetry into the m2m accessors.  At least for new designs it would likely be  better practice to use the name site_set rather than sites as in the above; then all the magic-removal m2m versions would have consistent obj.xxx_set.yyy names instead of the needlessly confusing mix seen here.  I guess the inferred name is still a little bit of magic that m-r can't do away with. mjm)
     587
    586588Also note that managers can't be accessed from instances:
    587589
Back to Top