Changes between Version 34 and Version 35 of ModelInheritance


Ignore:
Timestamp:
Jun 2, 2006, 1:45:40 PM (19 years ago)
Author:
Gary Wilson <gary.wilson@…>
Comment:

Removed "magic-removal" from the title since this didn't make it into magic-removal. Added some #!python's too.

Legend:

Unmodified
Added
Removed
Modified
  • ModelInheritance

    v34 v35  
    1 = magic-removal: Model Inheritance =
     1= Model Inheritance =
    22
    33This is a proposal for how subclassing should work in Django. There a lot of details to get right, so this proposal should be very specific and detailed. Most of the ideas here come from the thread linked below:
     
    261261
    262262{{{
     263#!python
    263264class Place(models.Model):
    264265    name = models.CharField(maxlength=50)
     
    271272
    272273{{{
     274#!python
    273275class Place(models.Model):
    274276    _meta = ...
     
    282284
    283285{{{
     286#!python
    284287        # Build complete list of parents
    285288        for base in bases:
     
    292295
    293296{{{
     297#!python
    294298        # Add Fields inherited from parents
    295299        for parent in new_class._meta.parents:
Back to Top