Commit 180bab94 authored by Michal Čihař's avatar Michal Čihař

Display all owners in admin interface

Issue #719
Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 110aa63f
......@@ -30,13 +30,17 @@ from weblate.trans.models import (
class ProjectAdmin(admin.ModelAdmin):
list_display = (
'name', 'slug', 'web', 'owner', 'enable_acl', 'enable_hooks',
'name', 'slug', 'web', 'list_owners', 'enable_acl', 'enable_hooks',
'num_vcs', 'num_strings', 'num_words', 'num_langs',
)
prepopulated_fields = {'slug': ('name',)}
search_fields = ['name', 'slug', 'web']
actions = ['update_from_git', 'update_checks', 'force_commit']
def list_owners(self, obj):
return ', '.join(obj.owners.values_list('username', flat=True))
list_owners.short_description = _('Owners')
def num_vcs(self, obj):
return obj.subproject_set.exclude(repo__startswith='weblate:/').count()
num_vcs.short_description = _('VCS repositories')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment