使用 Faker 库填充 Django 数据库我的代码,当我编译时它没有显示任何错误,但不在管理页面中填充假数据
This is my first file which is the script for populating the database: ('fake_data.py') when I run python fake_data.py it showing "populating fake_data populating complated!"
But when I am running server the fake data is not in admin page.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
注意
我不明白你为什么使用
faker
,但如果你想用随机数据填充数据库,那么在fake_data.py
q
和代码中其他位置的entry
,然后将它们都删除。Note
I don't understand why are you using
faker
but if you want to populate your database with random data then infake_data.py
q
andentry
else where in your code, then remove both of them.