mirror of
https://github.com/django/django.git
synced 2025-07-28 15:44:20 +00:00
Fixed #29385 -- Made admindocs ModelDetailView show model properties.
Original patch by bkaluza. Tests and docs by humbertotm.
This commit is contained in:
parent
085ebc5f1a
commit
747ff7a30b
4 changed files with 25 additions and 7 deletions
|
@ -208,6 +208,10 @@ class TestModelDetailView(TestDataMixin, AdminDocsTestCase):
|
|||
"""
|
||||
self.assertContains(self.response, "<td>baz, rox, *some_args, **some_kwargs</td>")
|
||||
|
||||
def test_instance_of_property_methods_are_displayed(self):
|
||||
"""Model properties are displayed as fields."""
|
||||
self.assertContains(self.response, '<td>a_property</td>')
|
||||
|
||||
def test_method_data_types(self):
|
||||
company = Company.objects.create(name="Django")
|
||||
person = Person.objects.create(first_name="Human", last_name="User", company=company)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue