上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 22 下一页
# 设置 不可编辑项 def get_readonly_fields(self, request, obj=None): # 判断是否是超级管理员 if request.user.is_superuser: self.readonly_fields = [] else: self.readonly_ Read More
posted @ 2022-05-12 16:49 PythonNew_Mr.Wang Views(308) Comments(0) Diggs(0)
from wordcloud import ImageColorGenerator from matplotlib.image import imread import matplotlib.pyplot as plt # 输出分词组合 ciyun_str = ciyun_word_str(ciyu Read More
posted @ 2022-05-07 11:44 PythonNew_Mr.Wang Views(116) Comments(0) Diggs(0)
import collections from snownlp import SnowNLP def word_counts_action(self, text, top_number): """ :param text: 统计的文本 :param top_number: 输出词频前几 """ # Read More
posted @ 2022-05-06 21:23 PythonNew_Mr.Wang Views(73) Comments(0) Diggs(0)
后端: message = {} list_f = models.Value_A.objects.all() str_list = "" for data in list_f: str_list = str_list +data.title + "," BASE_DIR = os.path.dirn Read More
posted @ 2022-04-14 10:27 PythonNew_Mr.Wang Views(43) Comments(0) Diggs(0)
def fine_word(text_raw): """ :param text_raw: 文本 :return: 返回中文字符串 """ text = "" regStr = ".*?([\u4E00-\u9FA5]+).*?" re_text = re.findall(regStr, text_ Read More
posted @ 2022-04-14 09:53 PythonNew_Mr.Wang Views(73) Comments(0) Diggs(0)
def find_province(city): """ :param city: "福州" :return: “福建” """ area_data = { '北京': ['北京市', '朝阳区', '海淀区', '通州区', '房山区', '丰台区', '昌平区', '大兴区', '顺义区', ' Read More
posted @ 2022-04-13 09:25 PythonNew_Mr.Wang Views(2305) Comments(0) Diggs(0)
### HTML ```HTML ``` ### JS ```JS ``` Read More
posted @ 2022-04-12 19:44 PythonNew_Mr.Wang Views(230) Comments(0) Diggs(0)
def export_as_excel_all(self, request, queryset): # queryset 是前端勾选的 meta = self.model._meta field_names_raw = [field.name for field in meta.fields] # Read More
posted @ 2022-03-23 15:42 PythonNew_Mr.Wang Views(280) Comments(0) Diggs(0)
HTML: url.py: url('task/post/$', add_task.AddTask.as_view()),add_task.py: import os import random from rest_framework.views import APIView from django Read More
posted @ 2022-03-19 18:50 PythonNew_Mr.Wang Views(460) Comments(0) Diggs(0)
from rest_framework.views import APIView from django.shortcuts import render,redirect,HttpResponse from database import models from django.http import Read More
posted @ 2022-03-18 19:41 PythonNew_Mr.Wang Views(194) Comments(0) Diggs(0)
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 22 下一页