2010-01-10 04:03:52 +08:00
|
|
|
"""
|
|
|
|
XX. Model inheritance
|
|
|
|
|
|
|
|
Model inheritance across apps can result in models with the same name resulting
|
|
|
|
in the need for an %(app_label)s format string. This app specifically tests
|
|
|
|
this feature by redefining the Copy model from model_inheritance/models.py
|
|
|
|
"""
|
|
|
|
|
|
|
|
from django.db import models
|
2011-10-14 02:04:12 +08:00
|
|
|
|
2013-02-26 20:19:18 +08:00
|
|
|
from model_inheritance.models import NamedURL
|
2012-08-12 18:32:08 +08:00
|
|
|
from django.utils.encoding import python_2_unicode_compatible
|
2010-01-10 04:03:52 +08:00
|
|
|
|
|
|
|
#
|
|
|
|
# Abstract base classes with related models
|
|
|
|
#
|
2012-08-12 18:32:08 +08:00
|
|
|
@python_2_unicode_compatible
|
2010-01-10 04:03:52 +08:00
|
|
|
class Copy(NamedURL):
|
|
|
|
content = models.TextField()
|
|
|
|
|
2012-08-12 18:32:08 +08:00
|
|
|
def __str__(self):
|
2010-01-10 04:03:52 +08:00
|
|
|
return self.content
|