Tweaked the 'Related documents' part of the Document admin page to more intuitively show the relationships.
- Legacy-Id: 15259
This commit is contained in:
parent
0df2c0dee8
commit
9fe1820640
|
@ -33,6 +33,10 @@ class DocAuthorInline(admin.TabularInline):
|
|||
|
||||
class RelatedDocumentInline(admin.TabularInline):
|
||||
model = RelatedDocument
|
||||
def this(self, instance):
|
||||
return instance.source.canonical_name()
|
||||
readonly_fields = ['this', ]
|
||||
fields = ['this', 'relationship', 'target', ]
|
||||
raw_id_fields = ['target']
|
||||
extra = 1
|
||||
|
||||
|
|
Loading…
Reference in a new issue