如何更改云中的数据库本地(django)
我在Django Framework中写了一个项目,并使用本地数据库SQLite,现在我想将其上传到云中,以便其他与我一起工作的人可以访问数据库IE,即创建用户时,我的共同存在将存在该用户。工人。
也许有人有关于如何执行此操作的指南,而无需修改数据库,以便我不必修改代码的其余部分?
I wrote a project in django framework and I use the local DataBase SQLite, and I now want to upload it to the cloud so other people who work with me can access DataBase i.e. when I create a user then that user will exist with my co-workers.
Maybe someone has a guide on how to do this without modifying the DataBase so that I do not have to modify the rest of the code?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我找到了答案,
您应该使用djongo 您应该做的是连接django和mongodb
您可以从在这里
我建议您遵循我的设定。
例如!!!
复制此链接并执行下一个setps:
pip install djongo
现在我们已经拥有Django项目(和应用程序),可以使用命令在MongoDB中创建集合:
如果您获得错误,例如' django.db.utils.databaseerror'
您应该做的是:
它删除了您创建的应用程序中的迁移文件夹中的所有文件,然后再运行上面的命令。
Ok i found the answer,
what you should do is Connect Django and MongoDB Using Djongo
you can read from here
I RECOMMEND TO FOLLOW MY SETPS.
after all this you will have this link:
for example!!!
copy this link and do the next setps:
pip install djongo
Now that we have the Django project (and app), you can create the collections in MongoDB using the commands:
if you get error like 'django.db.utils.databaseerror'
what you should to do is:
It deletes all the files that are in the migrations folder that are in the apps you have created and after that run again the command above.