PageRenderTime 102ms CodeModel.GetById 40ms app.highlight 1ms RepoModel.GetById 59ms app.codeStats 0ms

/tests/modeltests/model_inheritance_same_model_name/models.py

https://code.google.com/p/mango-py/
Python | 19 lines | 6 code | 3 blank | 10 comment | 0 complexity | e5cdefc27f245048b66d9c8ca1caa463 MD5 | raw file
 1"""
 2XX. Model inheritance
 3
 4Model inheritance across apps can result in models with the same name resulting
 5in the need for an %(app_label)s format string. This app specifically tests
 6this feature by redefining the Copy model from model_inheritance/models.py
 7"""
 8
 9from django.db import models
10from modeltests.model_inheritance.models import NamedURL
11
12#
13# Abstract base classes with related models
14#
15class Copy(NamedURL):
16    content = models.TextField()
17
18    def __unicode__(self):
19        return self.content