开发者

Ajax call in django admin panel

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜