Enable Django admin functionality at frontend with inlines

和自甴很熟 提交于 2019-12-05 02:52:09

I would suggest that you used the admin forms (in your views) or admin views (on custom urls) and just altering the admin templates, or even just loading the admin javascript, you can find it into the admin templates.

This task requires the support on a both frontend and backend sides.

It seems the simplest way is the using of django-admin forms itself on frontend if this is acceptable for you.

Any django admin form recognizes the ?_popup=1 parameter in the URL to suppresses the admin page decorations and serve just a form. All necessary JavaScript and CSS styles will be included. So admin forms could be shown on frontend in the iframe. A small hacking around on JavaScript-level is still required to adjust a size of iframe to the form and notify the page then form is closed.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!