Adding headers to columns of admin app page in Django -
i'm customizing admin panel django app , saw pre-1.8 using list_display = ['join', 'email', 'timestamp', 'updated'] add header columns of django app page , separated sections based on model.
i've tried list_display in django 1.8 , failing see header names being posted. there new command this?
fixed:
from django.contrib import admin .models import join class joinadmin(admin.modeladmin): list_display = ('emails', 'timestamp') class meta: model = join admin.site.register(join, joinadmin)
issue needed throw in second parameter in admin.site.register of joinadmin
Comments
Post a Comment