01 2024 档案
摘要:完整代码:https://gitee.com/mom925/django-system之前写的Django配置swagger(https://www.cnblogs.com/moon3496694/p/17657283.html)其实更多还是自己手动的写代码去书写接口文档,我希望它能更加的自动化生成
阅读全文
摘要:完整代码: https://gitee.com/mom925/django-system项目结构: 先安装所需库: pip install channels下面将websocket作为插件一样的只需要引入配置的结构asgi.py文件 http请求不变、修改websocket请求调用路径 import
阅读全文
摘要:完整代码 https://gitee.com/mom925/django-system 在settings.py中配置 REST_FRAMEWORK = { "EXCEPTION_HANDLER": "utils.exception.CustomExceptionHandler", # 自定义的异常
阅读全文
摘要:完整的代码 https://gitee.com/mom925/django-system 使用jwt实现用户认证 pip install djangorestframework-simplejwt 重新定义一下User类 class Users(AbstractUser): class Meta:
阅读全文