class MonitoredKeywordMore(APIView): def post(self, request): try: # 设置原生命令并且请求数据 parents_asin = str(request.data.get("parentsasin")) hour=str(request Read More
posted @ 2020-03-26 08:37 PythonNew_Mr.Wang Views(822) Comments(0) Diggs(0) Edit
如果是后台上传文件: setting配置: STATIC_URL = '/static/' STATICFILES_DIRS = [ os.path.join(BASE_DIR, 'static'), os.path.join(BASE_DIR, "media"), ] # Django用户上传的都 Read More
posted @ 2020-03-08 14:16 PythonNew_Mr.Wang Views(1767) Comments(0) Diggs(0) Edit
后端: from rest_framework.views import APIView from car import settings from django.shortcuts import render, redirect, HttpResponse from dal import mode Read More
posted @ 2020-03-06 23:28 PythonNew_Mr.Wang Views(1058) Comments(0) Diggs(0) Edit
from django.http import JsonResponse from rest_framework.utils import json from utils import requests_pro # from rest_framework.views import APIView f Read More
posted @ 2020-02-27 10:58 PythonNew_Mr.Wang Views(737) Comments(0) Diggs(0) Edit
page = session.get(url="https://www.qidian.com/") page.encoding = page.apparent_encoding page_text =page.text tree = etree.HTML(page_text) Read More
posted @ 2020-02-21 19:17 PythonNew_Mr.Wang Views(343) Comments(0) Diggs(0) Edit
from rest_framework.views import APIView from django.shortcuts import render,redirect,HttpResponse from dal import models from django.http import Json Read More
posted @ 2020-02-18 09:54 PythonNew_Mr.Wang Views(293) Comments(0) Diggs(0) Edit
xml文档: <GetMatchingProductResult ASIN="B071LF9R6G" status="Success">...</GetMatchingProductResult> <GetMatchingProductResult ASIN="B0714BP3H4" status= Read More
posted @ 2020-01-11 14:30 PythonNew_Mr.Wang Views(950) Comments(0) Diggs(0) Edit
t = ['B071LF9R6G', 'B0714BP3H4', 'B0756FL8R7', 'B072HX95ZR', 'B07CX389LX', 'B07D9MZ7BD', 'B07D9L15L5', 'B00L1UNPZ0', 'B07KDL9RSD', 'B01N02WUM3', 'B072 Read More
posted @ 2020-01-11 10:17 PythonNew_Mr.Wang Views(4697) Comments(2) Diggs(0) Edit
PS:这个玩法很有意思,pycharm还会飘红, t = ['B0716PK6R2','B077X9J24C','B01N2SBH4J'] count = 0 names = locals() for asin in t: count = count+ 1 names['asin' + str(co Read More
posted @ 2020-01-11 09:12 PythonNew_Mr.Wang Views(806) Comments(0) Diggs(0) Edit
PS:设置完异步任务后,如果出现文件名与依赖包冲突,那一定是你直接运行文件了,最好是在接口里面执行异步任务规避掉这个问题 s1.py(配置任务文件) from celery import Celery import time my_task = Celery("tasks", broker="red Read More
posted @ 2020-01-03 13:50 PythonNew_Mr.Wang Views(5899) Comments(2) Diggs(0) Edit