1:序列化获取数据的接口设计 1:分页获取序列化数据 2:是个能传参数的接口 class Society(APIView): def post(self, request): keywords = str(request.data.get("keywords")) data = {} try: s_ Read More
posted @ 2020-05-20 17:09 PythonNew_Mr.Wang Views(674) Comments(0) Diggs(0) Edit
1:导入element <!-- 引入样式 --> <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"> <!-- 引入组件库 --> <script src="https://cd Read More
posted @ 2020-05-18 21:29 PythonNew_Mr.Wang Views(2655) Comments(0) Diggs(0) Edit
<div style="float:right;" id="hub_iframe"></div> <script type="text/javascript"> function async_load() { i.scrolling = "no"; i.frameborder = "0"; i.bo Read More
posted @ 2020-05-18 15:16 PythonNew_Mr.Wang Views(346) Comments(0) Diggs(0) Edit
# 在列表页显示的字段,默认会显示所有字段,有对应的方法可以重写list_display = ('__str__',)# 在列表页显示的字段中,可以链接到change_form页面的字段list_display_links = ()# 右侧的筛选,必须是字段,可以继承自SimpleListFilte Read More
posted @ 2020-05-17 19:44 PythonNew_Mr.Wang Views(450) Comments(0) Diggs(0) Edit
1:下载与配置 适合版本: python3 下载:http://kindeditor.net/down.php 文档:http://kindeditor.net/doc.php 将文件包放入static文件夹内并且配置: settings.py配置: STATIC_URL = '/static/' Read More
posted @ 2020-05-17 15:53 PythonNew_Mr.Wang Views(480) Comments(0) Diggs(0) Edit
1:下载编辑器 适配版本: python3 下载地址:https://github.com/twz915/DjangoUeditor3 2:创建文件夹放入包 创建包extra_apps,将包放入文件夹里,右键点击extra_apps选中菜单mark directory as 选择 sources r Read More
posted @ 2020-05-17 11:03 PythonNew_Mr.Wang Views(456) Comments(0) Diggs(0) Edit
from lxml import etree import requests import re headers = { 'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chr Read More
posted @ 2020-05-14 13:25 PythonNew_Mr.Wang Views(1543) Comments(0) Diggs(0) Edit
class order(models.Model): """ 订单表 """ title = models.ForeignKey(to="task",verbose_name="任务标题") publisher = models.ForeignKey(to="UserInfo",related_na Read More
posted @ 2020-05-12 22:10 PythonNew_Mr.Wang Views(1013) Comments(0) Diggs(0) Edit
app.py: from django.apps import AppConfig class DalConfig(AppConfig): name = 'users' verbose_name = "师生管理" __init__.py: default_app_config = "users.ap Read More
posted @ 2020-04-18 13:05 PythonNew_Mr.Wang Views(554) Comments(0) Diggs(0) Edit
py文件: from django.utils.http import urlquote from rest_framework.views import APIView from django.shortcuts import render, redirect, HttpResponse from Read More
posted @ 2020-04-14 23:14 PythonNew_Mr.Wang Views(885) Comments(0) Diggs(0) Edit