mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #29385 -- Made admindocs ModelDetailView show model properties.
Original patch by bkaluza. Tests and docs by humbertotm.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user