上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 22 下一页
API.PY import queue from django.contrib.auth.hashers import check_password from rest_framework.views import APIView from Databases import models from Read More
posted @ 2020-11-16 23:49 PythonNew_Mr.Wang Views(331) Comments(0) Diggs(0)
# 数据表的设计 class ProMeetTable(models.Model): """ 个人安排表 """ user = models.ForeignKey(to="UserInfo",verbose_name="所属用户") week_choice = ( (1,"Monday"), (2, Read More
posted @ 2020-11-09 15:44 PythonNew_Mr.Wang Views(135) Comments(1) Diggs(0)
data = [ { "Monday": [{ "08:00": "Test", "09:00": "Test", "10:00": "Test", "11:00": "Test", }], }, { "Tuesday": [{ "08:00": "Test", "09:00": "Test", " Read More
posted @ 2020-11-07 20:55 PythonNew_Mr.Wang Views(79) Comments(0) Diggs(0)
1:创建 templatetags文件夹 2:创建simpletags.py文件将内容粘贴进去,在下面 3:setting.py添加文件指定: 1 TEMPLATES = [ 2 { 3 'BACKEND': 'django.template.backends.django.DjangoTempla Read More
posted @ 2020-10-31 15:19 PythonNew_Mr.Wang Views(893) Comments(0) Diggs(1)
找了半天原因,原来是因为辅助依赖包没安装完整: pip install numpy matplotlib pillow wordcloud imageio jieba snownlp itchat -i https://pypi.tuna.tsinghua.edu.cn/simple Read More
posted @ 2020-10-30 11:53 PythonNew_Mr.Wang Views(456) Comments(0) Diggs(0)
ajax请求出现: {"detail":"CSRF Failed: CSRF token missing or incorrect."} setting.py: # REST_FRAMEWORK配置 REST_FRAMEWORK = { 'DEFAULT_AUTHENTICATION_CLASSES Read More
posted @ 2020-10-23 16:43 PythonNew_Mr.Wang Views(236) Comments(0) Diggs(0)
from django.core.paginator import Paginator #自带分页from Databases import models # 数据首页def index(request): article = models.Article.objects.all() paginat Read More
posted @ 2020-10-16 16:49 PythonNew_Mr.Wang Views(132) Comments(0) Diggs(0)
1:刚刚买完服务器,在宝塔面板安装完一切工具,Django顺利运行后(不能运行一般是起了中文名) # 问题:想迁移数据库,结果发现-bash: python3: command not found# 解决:系统版本的Python是3.7.8 卸载不了,所以你只需要安装个3.7.2的版本即可,迁移命令 Read More
posted @ 2020-10-02 19:55 PythonNew_Mr.Wang Views(1791) Comments(0) Diggs(0)
concern_set = models.Concern.objects.filter(user_id=1).values("concern_id") querysets = models.Task.objects.none() # 创建一个空的对象 for concern_id in concer Read More
posted @ 2020-09-28 15:33 PythonNew_Mr.Wang Views(410) Comments(0) Diggs(0)
1:创建数据库以及更新数据库 #!/usr/bin/env python # -*- coding:utf-8 -*- from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column, Int Read More
posted @ 2020-09-27 22:34 PythonNew_Mr.Wang Views(644) Comments(0) Diggs(0)
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 22 下一页