随笔分类 - django restframwork学习
摘要:代码如下,自定义认证类: from rest_framework.exceptions import AuthenticationFailed from rest_framework_jwt.authentication import JSONWebTokenAuthentication from
阅读全文
摘要:1.flex初探 简单示例 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style> .menu { border: 1px solid red; width: 500px;
阅读全文
摘要:jwt组成 import base64, json, hashlib if __name__ == '__main__': """jwt 头部的生成""" header_data = {"typ": "jwt", "alg": "HS256"} header = base64.b64encode(
阅读全文
摘要:drf基础配置 版本: Django 3.2 djangorestframework 3.13.1 纯净版配置: INSTALLED_APPS = [ # 'django.contrib.admin', # 'django.contrib.auth', # 'django.contrib.conte
阅读全文