Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想手动处理我的所有用户,而不是自动注册过程。我查看了文档,并且有一个用于创建超级用户的命令行工具。我可以从命令行或一些等效的手动过程创建普通用户吗?
create_user()您可以在 Django附带的 django 辅助函数中创建用户。您可以参考此链接以获取 Django 文档中提供的更多信息。
create_user()
另一种方法是直接将所有用户列表转储到数据库中。假设您使用 MySQL 数据库,您可以简单地将数据从 CSV 格式转储到 MySQL 数据库中。