It's possible, but fairly fiddly. You can create a custom
change_list.html template for just that application + model name
combination (since the admin interface tries to load a template under
admin/<app_name>/<model_name>/change_list.html as one of the options for
that page). Then you need to write a template that displays what you
would like, which possibly means duplicating a lot of the logic of the
original page and the template tags that construct it. With a bit of
tracing through the code (admin/templates/admin/change_list.html,
admin/tempates/admin/change_list_result.html,
admin/templatetags/admin_list.py, admin/views/main.py) it should be
quite possible to achieve what you want. Take your time and you'll get
there (or use newforms-admin or wait for newforms-admin to be merged
into trunk, both of which will be easier).
Note that this sort of customisation does require you to read some
Python code and templates and do a bit of design work. There isn't a
step-by-step guide, so if you aren't up to being able to read the code a
bit, this probably isn't the right sort of customisation to be trying to
make.
Regards,
Malcolm
--
Tolkien is hobbit-forming.
http://www.pointy-stick.com/blog/
You're really asking, in general, whether it's possible to make the
admin interface more customisable. Yes there is and through the
advantage of owning a time machine, we've already done it in the
newforms-admin branch. Not sure if your precise problem is addressed
specifically there, but most customisations are easier. That's on track
to be merged with trunk "soon", so it's not worth worrying too much
about anything with existing admin beyond just getting something to work
at the moment.
> In that way, I might
> be able to modify the
> data before it is passed to template.
>
> I had expected there is a magic function in model class to change it. :
> (
Why? Models represent data storage not presentation. The new admin
actually moves all of the admin stuff out of the model as part of being
more consistent in that area (along with a bunch of other benefits like
allowing multiple admin setups for a model).
Regards,
Malcolm
--
Always try to be modest and be proud of it!
http://www.pointy-stick.com/blog/
Django's wiki and documentation and things really are very
search-engine-friendly. :-)
http://www.google.com/search?q=django+newforms-admin
The wiki page is probably the right place to start:
http://code.djangoproject.com/wiki/NewformsAdminBranch
Regards,
Malcolm
--
Honk if you love peace and quiet.
http://www.pointy-stick.com/blog/