A simple Article model for testing
| 11 | |
| 12 | |
| 13 | class Article(models.Model): |
| 14 | """ |
| 15 | A simple Article model for testing |
| 16 | """ |
| 17 | |
| 18 | site = models.ForeignKey(Site, models.CASCADE, related_name="admin_articles") |
| 19 | title = models.CharField(max_length=100) |
| 20 | hist = models.CharField( |
| 21 | max_length=100, |
| 22 | verbose_name=_("History"), |
| 23 | help_text=_("History help text"), |
| 24 | ) |
| 25 | created = models.DateTimeField(null=True) |
| 26 | |
| 27 | def __str__(self): |
| 28 | return self.title |
| 29 | |
| 30 | def test_from_model(self): |
| 31 | return "nothing" |
| 32 | |
| 33 | @admin.display(description="not What you Expect") |
| 34 | def test_from_model_with_override(self): |
| 35 | return "nothing" |
| 36 | |
| 37 | |
| 38 | class ArticleProxy(Article): |
no outgoing calls