带有遗留数据库的 Django
我需要在现有数据库之上构建一个 django 项目。 我将按照 django 文档中的说明使用检查数据库,然后使用同步数据库来创建 django 所需的表。
有没有办法跟踪 django 特定表(管理权限、内容类型...)? 我希望将来如果需要的话能够完全删除 django。
谢谢
I need to build a django project on top of an existing database.
I'll use inspectdb as explained in the django docs and then syncdb to create the django required tables.
Is there a way to keep track of the django specific tables (admin permissions, content types...)?
I want to be able to remove django completely in the future if needed.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您正在使用某些 django 模块,那么您可以通过查找使用的应用程序名称以及主 django 表来检测模式中的表。这些是:
对于来自 django 的身份验证应用程序:
只需查找您从 django 使用的应用程序,这些应用程序的表将具有应用程序名称前缀。那些你必须放弃的。
If you are using some django modules, then you can detect tables in schema, by looking for used app names and also for main django tables. These are:
And for auth app from django:
Just look for apps that you use from django and tables for those apps will have app name prefix. Those you must drop.