Django
Man呦
这个作者很懒,什么都没留下…
展开
-
解决Django struct.error: unpack requires a bytes object of length 4
原因分析在django项目的时候不小心,不小心把部分代码删除,在撤销找回的时候,发现运行不起来了。报了个 struct.error: unpack requires a bytes object of length 4的错误。对报错信息进行了分析,觉得是xadmin 出了问题在对比xadmin文件时,发现多了写.mo结尾的文件,感觉应该是这有问题,把xadmin重新一替换,在重启,项目能正常运行。...原创 2021-03-03 13:37:38 · 910 阅读 · 1 评论 -
django crontab UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfe in position 9: invalid start
问题描述:在阿里云服务器启动django定时任务出现UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xfe in position 9: invalid start,解决思路:一看是以为python的版本出问题,出问题的全是源码,修改了半天,查找了半天都是争对python解决的。定时任务时直接把任务写入操作系统,有一个专门的定时任...原创 2019-11-20 11:05:54 · 547 阅读 · 0 评论 -
SMTPAuthenticationError: (535, b'Error: authentication failed')
SMTPAuthenticationError: 535, b'Error: authentication failed'邮箱发送出现535开启服务邮箱发送相关配置信息重启celery服务邮箱发送出现535File "/usr/lib/python3.5/smtplib.py", line 720, in login initial_response_ok=initial_respon...原创 2019-02-21 18:11:17 · 12979 阅读 · 10 评论 -
django.db.utils.InternalError: (1050, "Table 'tb_address' already exists")
1050,Django数据库迁移时错误解决办法解决办法python manage.py migrate users --fakeuser 为你的子应用名字原创 2019-02-22 14:57:42 · 732 阅读 · 0 评论 -
django 跨越报错 ?: (corsheaders.E013) Origin '127.0.0.1:8080' in CORS_ORIGIN_WHITELIST is missing schem
?: (corsheaders.E013) Origin ‘127.0.0.1:8080’ in CORS_ORIGIN_WHITELIST is missing scheme or netloc HINT: Add a scheme (e.g. https://) or netloc (e.g. example.com). ?: (corsheaders.E013) Origin ‘loca...原创 2019-09-16 15:27:54 · 1499 阅读 · 0 评论 -
django rest_framework中jwt签发及认证
django jwt签发安装pip install djangorestframework-jwt配置REST_FRAMEWORK = { 'DEFAULT_AUTHENTICATION_CLASSES': ( 'rest_framework_jwt.authentication.JSONWebTokenAuthentication', 'rest...原创 2019-09-26 17:31:52 · 453 阅读 · 2 评论