Django管理站点,可以在一个页面中访问多个表(站点?)

2024-06-25 23:27:46 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图利用Django管理页面来构建一个页面,该页面显示从多个表中查询到的信息,因此看起来像

page1:
    account1
    account2
    account3

单击account1时:

account1 info page:
    attri1 from table1
    attri2 from table1
    attri1 from table2
    attri1 from table3

实际上,我只想从多个表中获取信息,但我不确定Django admin是否做到了这一点。我总是只使用一个表创建站点。所有这些表都由foreignKey(帐户名)链接

有可能吗?你知道吗


Tags: djangofrominfo信息利用page页面page1