随笔分类 -  django框架基础

摘要:分页方法一: 安装:npm i element-ui -S 前端配置:import ElementUI from 'element_ui' import 'element-ui/lib/theme-chalk/index.css' Vue.use(ElementUI) <el-pagination 阅读全文
posted @ 2020-10-20 16:32 后羿的百宝箱 阅读(114) 评论(0) 推荐(0)
摘要:from django.shortcuts import render from rest_framework.views import APIView from rest_framework.response import Response from .models import * from . 阅读全文
posted @ 2020-09-04 17:23 后羿的百宝箱 阅读(261) 评论(0) 推荐(0)
摘要:解决django的跨域问题需要 阅读全文
posted @ 2020-09-04 17:14 后羿的百宝箱 阅读(193) 评论(0) 推荐(0)
摘要:post请求在二级目录下的views.py文件中写入 from django.http import HttpResponse # Create your views here. a = {"name":"来了老弟","pwd":"老弟你真棒"} #声明全局变量 def indexb(request 阅读全文
posted @ 2019-12-20 19:54 后羿的百宝箱 阅读(1010) 评论(0) 推荐(0)
摘要:1.get请求在二级目录下的views.py文件中写入 声明全局变量 c = "pp" d = "123" def indexa(request): if request.method == "GET": name = request.GET.get("name") pwd = request.GE 阅读全文
posted @ 2019-12-20 19:43 后羿的百宝箱 阅读(323) 评论(0) 推荐(0)
摘要:1.配置路由 : 在自己创建的django用户名中有urls.py这个文件在这个里面配置 from django.contrib import admin from django.urls import path from django.urls.conf import include urlpat 阅读全文
posted @ 2019-12-20 19:12 后羿的百宝箱 阅读(162) 评论(0) 推荐(0)