Django InlineAdmin.template not being overriden -
i'm using django 1.3 , trying customize appearance of tabulatinline admin model in django admin site. i'm trying override 'admin/edit_inline/tabular.html' template own. per documentation following:
from django.contrib import admin myapp.models import mychildmodel, myparentmodel class mychildmodelinlineadmin(admin.tabularinline): model = mychildmodel template = 'mytabular.html' ... class myparentmodeladmin(admin.modeladmin): model = myparentmodel inlines = [mychildmodelinlineadmin,] admin.site.register(myparentmodel, myparentmodeladmin)
let's have application called myapp
, code above in admin.py module of app , template mytabular.html
in templates
directory of app.
the thing no matter settings (e.g. template dirs) other templates work fine views.py, admin site seems ignore template option of mychildmodelinlineadmin.
if debug code in eclipse , comment line template = 'mytabular.html'
, mychildmodelinlineadmin
contains template = admin/edit_inline/tabular.html
option being overriden right. no changes in mytabular.html seen on page whereas changes of original template are.
so, first question - what's matter admin site template system? , second - when admin page being rendered? if know answer able hack figure out workaround.
Comments
Post a Comment