25 lines
537 B
Python
25 lines
537 B
Python
from django.contrib import admin
|
|
|
|
from . import models
|
|
|
|
|
|
@admin.decorators.register(models.Text)
|
|
class TextAdmin(admin.ModelAdmin):
|
|
list_display = (
|
|
'__str__',
|
|
'item',
|
|
'edit',
|
|
'language',
|
|
'slug',
|
|
'public',
|
|
'position',
|
|
)
|
|
list_editable = ['public', 'language']
|
|
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
|