from django.contrib import admin from . import models @admin.decorators.register(models.Text) class TextAdmin(admin.ModelAdmin): list_display = ( '__str__', 'item', 'edit', 'slug', 'public', 'position', ) def item(self, obj): return obj.data.get('item') def edit(self, obj): return obj.data.get('edit') #@admin.decorators.register(models.Page) #class PageAdmin(admin.ModelAdmin): # pass