MCPcopy
hub / github.com/django/django / Article

Class Article

tests/admin_utils/models.py:13–35  ·  view source on GitHub ↗

A simple Article model for testing

Source from the content-addressed store, hash-verified

11
12
13class 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
38class ArticleProxy(Article):

Callers 1

Calls

no outgoing calls

Tested by 1