Changes between Version 6 and Version 7 of RemovingTheMagic
- Timestamp:
- Dec 7, 2005, 9:59:39 AM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
RemovingTheMagic
v6 v7 79 79 }}} 80 80 81 If a model already has an {{{objects}}} attribute, the field-accessor attribute is renamed to {{{objects_}}}.81 If a model already has an {{{objects}}} attribute, you'll need to specify an alternate name for the magic {{{objects}}}. 82 82 83 83 {{{ … … 87 87 last_name = models.CharField(maxlength=30) 88 88 objects = models.TextField() 89 class META: 90 manager = Manager(name='more_objects') 89 91 90 p = Person(first_name='Mary', last_name='Jones', objects_='Hello there.') 92 93 p = Person(first_name='Mary', last_name='Jones', objects='Hello there.') 91 94 p.save() 92 p.objects_ == 'Hello there.' 95 p.objects == 'Hello there.' 96 Person.more_objects.get_list() 93 97 }}} 94 98