摘要:
1.安装 pip install django-rest-swagger 2.配置 rest_api/settings.py INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.conte 阅读全文
摘要:
1.django中的log需要在settings.py中配置 import time cur_path = os.path.dirname(os.path.realpath(__file__)) # log_path是存放日志的路径 log_path = os.path.join(os.path.d 阅读全文
摘要:
1.安装django-cors-headers pip install django-cors-headers 2.配置settings.py文件 INSTALLED_APPS = [ ... 'corsheaders', ... ] # 添加中间件MIDDLEWARE = [ 'django.mi 阅读全文