2010-01-09 20:03:52 +00: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-13 18:04:12 +00:00
|
|
|
|
2013-02-26 12:19:18 +00:00
|
|
|
from model_inheritance.models import NamedURL
|
2012-08-12 10:32:08 +00:00
|
|
|
from django.utils.encoding import python_2_unicode_compatible
|
2010-01-09 20:03:52 +00:00
|
|
|
|
2013-11-03 04:36:09 +00:00
|
|
|
|
2010-01-09 20:03:52 +00:00
|
|
|
#
|
|
|
|
# Abstract base classes with related models
|
|
|
|
#
|
2012-08-12 10:32:08 +00:00
|
|
|
@python_2_unicode_compatible
|
2010-01-09 20:03:52 +00:00
|
|
|
class Copy(NamedURL):
|
|
|
|
content = models.TextField()
|
|
|
|
|
2012-08-12 10:32:08 +00:00
|
|
|
def __str__(self):
|
2010-01-09 20:03:52 +00:00
|
|
|
return self.content
|