简体   繁体   English

Django查找表和字段

[英]Django lookup tables and fields

Can I look around in a database with Django? 我可以使用Django在数据库中四处查看吗? I mean outputting a list of all tables, all fields in tables and all objects in a specific table? 我的意思是输出所有表,表中的所有字段以及特定表中的所有对象的列表?

I know how to build models and lookup objects, but can I lookup fields in a preexisting database? 我知道如何构建模型和查找对象,但是我可以在现有数据库中查找字段吗? I have a bit experience with unmanaged django models, but if I should use those, then I have to create models for alle the tables and specify each field. 我对非托管Django模型有一些经验,但是如果我要使用这些模型,则必须为所有表创建模型并指定每个字段。 I think it should be possible to just look around in a database without 'managing it'. 我认为无需“管理”数据库就可以浏览数据库。 At least there must be a existing project on github or such with the functionality? 至少在github上必须有一个现有项目或具有该功能的项目? Thank you. 谢谢。

您可以使用原始SQL查询执行诸如Show Table之类的语句

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM