parts/django/tests/modeltests/model_inheritance_same_model_name/models.py
changeset 307 c6bca38c1cbf
equal deleted inserted replaced
306:5ff1fc726848 307:c6bca38c1cbf
       
     1 """
       
     2 XX. Model inheritance
       
     3 
       
     4 Model inheritance across apps can result in models with the same name resulting
       
     5 in the need for an %(app_label)s format string. This app specifically tests
       
     6 this feature by redefining the Copy model from model_inheritance/models.py
       
     7 """
       
     8 
       
     9 from django.db import models
       
    10 from modeltests.model_inheritance.models import NamedURL
       
    11 
       
    12 #
       
    13 # Abstract base classes with related models
       
    14 #
       
    15 class Copy(NamedURL):
       
    16     content = models.TextField()
       
    17 
       
    18     def __unicode__(self):
       
    19         return self.content