add language field to text model, output en and zh texts separately, refs #30

This commit is contained in:
Sanjay B 2021-10-28 15:42:34 +05:30
commit 21dab42524
5 changed files with 44 additions and 6 deletions

View file

@ -9,11 +9,12 @@ class TextAdmin(admin.ModelAdmin):
'__str__',
'item',
'edit',
'language',
'slug',
'public',
'position',
)
list_editable = ['public', 'language']
def item(self, obj):
return obj.data.get('item')
def edit(self, obj):