随笔分类 - 前后端分离
摘要:1.项目结构 2.根据后端api编写 super_cmdb/api/api.js import axios from 'axios' var boamp_api_address = 'http://127.0.0.1:8001'; export function getVersionList() {
阅读全文
摘要:1.安装django-rest-framework pip install django-rest-frameworkpip install django-cors-headers 2.创建项目app super_cmdb_api python manage.py startapp super_cm
阅读全文
摘要:1.后端python django代码: import json from django.shortcuts import HttpResponse from django.http import JsonResponse from databases_models import models fr
阅读全文