没有“模型”的Django管理员部分 [英] Django admin, section without "model"?

查看:143
本文介绍了没有“模型”的Django管理员部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Django管理控制台中,所有部分(菜单链接)来自具有数据库表的模型,但是如果我需要一个没有相应的模型对象(没有数据库表)的部分,则需要做什么才能从其他部分获取数据与模型?



任何想法?感谢

解决方案

看起来你想添加新的管理网址与您自己的自定义视图和模板:链接文本



您可以以这种方式构建新的管理员,而不需要新的模型。


in the Django administration console, all section (menu links) come from models with database tables, but what would I need to do if I need a section without a corresponding model object (no database table) that fetches data from other section with model?

Any ideas? Thanks

解决方案

It looks like you want to add new admin urls with your own customized views and template:link text

You can construct those new admins without a new model this way.

这篇关于没有“模型”的Django管理员部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆