Re: How to overwrite the hyperlink of objects in change list template of django admin?

2008-04-20 Thread Leon
I had worked out my way. The hyperlink for a specifc object in admin interface is actually hardcoded in contrib.admin.views.main.py, line 766: def url_for_result(self, result): return "%s/" % quote(getattr(result, self.pk_attname)) so what I did, is to overwrite this method of the gi

Re: How to overwrite the hyperlink of objects in change list template of django admin?

2008-04-14 Thread Malcolm Tredinnick
On Mon, 2008-04-14 at 20:50 -0700, Leon wrote: > Great. I'll wait for the newforms-admin branch integration. > > Is there any document about this newforms-admin? Django's wiki and documentation and things really are very search-engine-friendly. :-) http://www.google.com/search?q=django+newform

Re: How to overwrite the hyperlink of objects in change list template of django admin?

2008-04-14 Thread Leon
Great. I'll wait for the newforms-admin branch integration. Is there any document about this newforms-admin? On Apr 15, 9:22 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Mon, 2008-04-14 at 04:04 -0700, Leon wrote: > > I've tried that method and make my own object list in the customized

Re: How to overwrite the hyperlink of objects in change list template of django admin?

2008-04-14 Thread Malcolm Tredinnick
On Mon, 2008-04-14 at 04:04 -0700, Leon wrote: > I've tried that method and make my own object list in the customized > change_list.html. > That REALLY duplicate a lot of works. Is it possible to add a hook > function (middleware?) just > before the change_list template being rendered? You're re

Re: How to overwrite the hyperlink of objects in change list template of django admin?

2008-04-14 Thread Leon
I've tried that method and make my own object list in the customized change_list.html. That REALLY duplicate a lot of works. Is it possible to add a hook function (middleware?) just before the change_list template being rendered? In that way, I might be able to modify the data before it is passed

Re: How to overwrite the hyperlink of objects in change list template of django admin?

2008-04-13 Thread Malcolm Tredinnick
On Sun, 2008-04-13 at 06:20 -0700, Leon wrote: > 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 d

How to overwrite the hyperlink of objects in change list template of django admin?

2008-04-13 Thread Leon
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 m