Fixed #29385 -- Made admindocs ModelDetailView show model properties.

Original patch by bkaluza. Tests and docs by humbertotm.
This commit is contained in:
humbertotm 2018-05-28 19:59:03 -07:00 committed by Tim Graham
parent 085ebc5f1a
commit 747ff7a30b
4 changed files with 25 additions and 7 deletions

View file

@ -52,6 +52,10 @@ class Person(models.Model):
def dummy_function(self, baz, rox, *some_args, **some_kwargs):
return some_kwargs
@property
def a_property(self):
return 'a_property'
def suffix_company_name(self, suffix='ltd'):
return self.company.name + suffix