phantasma/app/text/admin.py
2021-10-26 13:16:43 +01:00

24 lines
475 B
Python

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