10 2020 档案
摘要:1:创建 templatetags文件夹 2:创建simpletags.py文件将内容粘贴进去,在下面 3:setting.py添加文件指定: 1 TEMPLATES = [ 2 { 3 'BACKEND': 'django.template.backends.django.DjangoTempla
阅读全文
摘要:找了半天原因,原来是因为辅助依赖包没安装完整: pip install numpy matplotlib pillow wordcloud imageio jieba snownlp itchat -i https://pypi.tuna.tsinghua.edu.cn/simple
阅读全文
摘要:ajax请求出现: {"detail":"CSRF Failed: CSRF token missing or incorrect."} setting.py: # REST_FRAMEWORK配置 REST_FRAMEWORK = { 'DEFAULT_AUTHENTICATION_CLASSES
阅读全文
摘要:from django.core.paginator import Paginator #自带分页from Databases import models # 数据首页def index(request): article = models.Article.objects.all() paginat
阅读全文
摘要:1:刚刚买完服务器,在宝塔面板安装完一切工具,Django顺利运行后(不能运行一般是起了中文名) # 问题:想迁移数据库,结果发现-bash: python3: command not found# 解决:系统版本的Python是3.7.8 卸载不了,所以你只需要安装个3.7.2的版本即可,迁移命令
阅读全文