Skip to content

Commit

Permalink
close #40
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelhenry committed Jan 30, 2019
1 parent 863b8a6 commit 3c3d5df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/Localizr/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class KeyStringAdmin(BaseModelAdmin):

ordering = ('key',)
search_fields = ('key','description',)
list_display = ('key' ,'description',)
list_display = ('key' ,'description', 'available_locales')
inlines = [LocalizedStringInline,]
readonly_fields = ('modified_by', 'modified', 'created_by', 'created',)

Expand Down
4 changes: 3 additions & 1 deletion apps/Localizr/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ class Meta(object):
unique_together = ('key',)
verbose_name = 'Key'
verbose_name_plural = 'Keys'


def available_locales(self):
return ",".join(list(self.values.values_list('locale__code', flat=True)))

class AppInfoKeyStringQuerySet(models.QuerySet):

Expand Down

0 comments on commit 3c3d5df

Please sign in to comment.