Changes between Version 8 and Version 9 of ModelInheritance
- Timestamp:
- Feb 27, 2006, 3:52:32 PM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ModelInheritance
v8 v9 147 147 remove_fields = ...some fields... 148 148 }}} 149 150 == Ramblings on Magic Removal Subclassing == 151 152 For the above Restaurant example: 153 154 {{{ 155 class Place(models.Model): 156 name = models.CharField(maxlength=50) 157 158 class Restaurant(Place): 159 description = models.TextField() 160 }}} 161 162 we want Restaurant to have a 'name' CharField. However, fields from parent classes are included when the class is created.