开发者

Ajax call in django admin panel

开发者 https://www.devze.com 2023-03-14 06:15 出处:网络
My project contains a Loc model that saves lat,lng and address of a location. And to find location points more easily, I\'m using google-map. The problem is, I want to update my google-map whenever ad

My project contains a Loc model that saves lat,lng and address of a location. And to find location points more easily, I'm using google-map. The problem is, I want to update my google-map whenever address field is changed.

I don't know how to change admin views or is it possible to check reque开发者_JAVA百科sts in admin forms .. Any idea ?


Take a look at this this snippet: Google map on admin address field

It demonstrates the general idea and should be easily adjustable to your specific needs,


You can override the template to include your Ajax javascript and call a custom view from that. Can't you?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号