Changes between Version 8 and Version 9 of ModelInheritance


Ignore:
Timestamp:
Feb 27, 2006, 3:52:32 PM (19 years ago)
Author:
cell@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ModelInheritance

    v8 v9  
    147147        remove_fields = ...some fields...
    148148}}}
     149
     150== Ramblings on Magic Removal Subclassing ==
     151
     152For the above Restaurant example:
     153
     154{{{
     155class Place(models.Model):
     156    name = models.CharField(maxlength=50)
     157
     158class Restaurant(Place):
     159    description = models.TextField()
     160}}}
     161
     162we want Restaurant to have a 'name' CharField.  However, fields from parent classes are included when the class is created.
Back to Top