The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
From: Malcolm Tredinnick <malc...@pointy-stick.com>
Date: Mon, 14 Apr 2008 11:23:09 +1000
Local: Mon, Apr 14 2008 11:23 am
Subject: Re: How to overwrite the hyperlink of objects in change list template of django admin?
On Sun, 2008-04-13 at 06:20 -0700, Leon wrote: It's possible, but fairly fiddly. You can create a custom > Hi, > I use django admin to manage a table. There is a hyperlink for > each object in the change_list template, which will bring me to the > change_form template. I want to change that hyperlink and redirect it > to another url to handle. I didn't want to customize the current > change_form for this model because it is still used somewhere else. > Anybody knows how to do it? 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 Regards, -- You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||