PageRenderTime 179ms CodeModel.GetById 163ms RepoModel.GetById 0ms 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
Possible License(s): BSD-3-Clause
  1. """
  2. XX. Model inheritance
  3. Model inheritance across apps can result in models with the same name resulting
  4. in the need for an %(app_label)s format string. This app specifically tests
  5. this feature by redefining the Copy model from model_inheritance/models.py
  6. """
  7. from django.db import models
  8. from modeltests.model_inheritance.models import NamedURL
  9. #
  10. # Abstract base classes with related models
  11. #
  12. class Copy(NamedURL):
  13. content = models.TextField()
  14. def __unicode__(self):
  15. return self.content