Django TypeError: argument of type ‘PosixPath‘ is not iterable

登录时,在数据库部分出现了以上错误。

解决方案:

setting.py中 DATABASE部分,将路径转为字符串。

  • 4
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Author: Audrey Roy Greenfeld, Daniel Roy Greenfeld Length: 556 pages Edition: 1 Publication Date: 2017-06-30 table: Chapter 1: Coding Style Chapter 2: The Optimal Django Environment Setup Chapter 3: How to Lay Out Django Projects Chapter 4: Fundamentals of Django App Design Chapter 5: Settings and Requirements Files Chapter 6: Model Best Practices Chapter 7: Queries and the Database Layer Chapter 8: Function- and Class-Based Views Chapter 9: Best Practices for Function-Based Views Chapter 10: Best Practices for Class-Based Views Chapter 11: Form Fundamentals Chapter 12: Common Patterns for Forms Chapter 13: Templates: Best Practices Chapter 14: Template Tags and Filters Chapter 15: Django Templates and Jinja2 Chapter 16: Building REST APIs with Django REST Framework (NEW) Chapter 17: Consuming REST APIs Chapter 18: Tradeoffs of Replacing Core Components Chapter 19: Working With the Django Admin Chapter 20: Dealing with the User Model Chapter 21: Django's Secret Sauce: Third-Party Packages Chapter 22: Testing Chapter of Doom! Chapter 23: Documentation: Be Obsessed Chapter 24: Finding and Reducing Bottlenecks Chapter 25: Security Best Practices Chapter 26: Logging: What's It For, Anyway? Chapter 27: Signals: Use Cases and Avoidance Techniques Chapter 28: What About Those Random Utilities? Chapter 29: Deployment: Platforms as a Service Chapter 30: Deploying Django Projects Chapter 31: Continuous Integration Chapter 32: The Art of Debugging Chapter 33: Where and How to Ask Django Questions Chapter 34: Closing Thoughts Appendix A: Packages Mentioned in This Book Appendix B: Troubleshooting Installation Appendix C: Additional Resources Appendix D: Internationalization and Localization Appendix E: Settings Alternatives Appendix F: Advice for Python 2.7 Users (NEW) Appendix G: Security Settings Reference Appendix H: Handling Security Failures (NEW) Appendix i: Channels and Websockets (NEW) Acknowledgments Index

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值