摘要: 问题1:Specifying a namespace in include() without providing an app_name is not supported. # django1.x中, urls.py urlpatterns = [ url(r'^admin/', include( 阅读全文
posted @ 2022-08-26 10:22 我叫好名字 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 运行项目时报错“query = query.decode(errors=‘replace‘) AttributeError: ‘str‘ object has no attribute ‘decode‘”(虚拟环境下) 解决方法: 在报错内容中进入“~/.virtualenvs/your_env_n 阅读全文
posted @ 2022-08-26 10:08 我叫好名字 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 问题1:创建用户时是否使用的是create_user 在账号注册的时候,要用objects.create_user()函数,create()是明文存储 create_user()这个函数会将密码自动加密,密文存储,加密规则“pbkdf2_sha256” authenticate()会将输入的明文密码 阅读全文
posted @ 2022-08-26 09:53 我叫好名字 阅读(313) 评论(0) 推荐(0) 编辑