mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	add document count column for tags and correspondents
This commit is contained in:
		| @@ -105,17 +105,23 @@ class CommonAdmin(admin.ModelAdmin): | ||||
|  | ||||
| class CorrespondentAdmin(CommonAdmin): | ||||
|  | ||||
|     list_display = ("name", "match", "matching_algorithm") | ||||
|     list_display = ("name", "match", "matching_algorithm", "document_count") | ||||
|     list_filter = ("matching_algorithm",) | ||||
|     list_editable = ("match", "matching_algorithm") | ||||
|  | ||||
|     def document_count(self, obj): | ||||
|         return obj.documents.count() | ||||
|  | ||||
|  | ||||
| class TagAdmin(CommonAdmin): | ||||
|  | ||||
|     list_display = ("name", "colour", "match", "matching_algorithm") | ||||
|     list_display = ("name", "colour", "match", "matching_algorithm", "document_count") | ||||
|     list_filter = ("colour", "matching_algorithm") | ||||
|     list_editable = ("colour", "match", "matching_algorithm") | ||||
|  | ||||
|     def document_count(self, obj): | ||||
|         return obj.documents.count() | ||||
|  | ||||
|  | ||||
| class DocumentAdmin(CommonAdmin): | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Enno Lohmeier
					Enno Lohmeier