使用Xadmin,执行makemigrations和migrate时运行报错提示:

AttributeError: 'Settings' object has no attribute 'TEMPLATE_CONTEXT_PROCESSORS'

方法一:

setting.py文件添加以下信息:

TEMPLATE_CONTEXT_PROCESSORS = (
'django.contrib.auth.context_processors.auth',
'django.core.context_processors.auth'
'django.core.context_processors.debug',
'django.core.context_processors.media',
'django.core.context_processors.static',
'django.core.context_processors.tz',
'django.contrib.messages.context_processors.messages',
'learn_models.context_processors.test',
)

方法二:

https://github.com/sshwsfc/xadmin下载源码,因为github该Bug被修复了,而pypi没有更新导致的。

django错误笔记(xadmin)——AttributeError: 'Settings' object has no attribute 'TEMPLATE_CONTEXT_PROCESSORS'的更多相关文章

  1. Caffe SSD AttributeError: 'module' object has no attribute 'LabelMap'

    caffe ssd 错误描述: AttributeError: 'module' object has no attribute 'LabelMap' SSD from caffe.proto imp ...

  2. python文件名不要跟模块名相同,报错AttributeError: 'module' object has no attribute 'Differ'

    python中的文件都会生成pyc文件,包括模块也是这样,所以调用模块的时候,实际上会调用模块.pyc文件:在这个前提下,如果将文件名命名成跟模块名一样,在同一目录下就会生成一个跟模块名一样的pyc文 ...

  3. Django项目与mysql交互进行数据迁移时报错:AttributeError: 'str' object has no attribute 'decode'

    问题描述 Django项目启动,当我们执行命令 python manage.py makemigrations 出现如下错误: File , in last_executed_query query ...

  4. Django 运行报异常:AttributeError: 'str' object has no attribute 'get'

    Technorati Tags: Python,Django,Web 在使用django.contrib.auth用户机制进行用户的验证.登录.注销操作时,遇到这个异常. 首先是写了一个登录的视图,要 ...

  5. flask_route错误:AttributeError: 'function' object has no attribute 'route'

    问题: 路由完全正确,当只有一个名为home的函数处理这个路由时候,下一个路由处理函数,总是提示没有这个rotue属性 Traceback (most recent call last): File ...

  6. pycharm install python packaging tools时遇到AttributeError: '_NamespacePath' object has no attribute 'sort'错误

    pycharm install python packaging tools时报错AttributeError: '_NamespacePath' object has no attribute 's ...

  7. Python错误:AttributeError: 'generator' object has no attribute 'next'解决办法

    今天在学习生成器对象(generation object)运行以下代码时,遇到了一个错误: #定义生成器函数def liebiao(): for x in range(10): yield x#函数调 ...

  8. AttributeError: 'Table' object has no attribute 'plot'错误

    今天在用到camelot爬取pdf的表格时,想选取部分区域进行爬取,就想用plot把pdf画一下,选个坐标. 看了网上的示例,在使用camelot.read_pdf获取当前页面以后调用tables[0 ...

  9. Django2.2报错 AttributeError: 'str' object has no attribute 'decode'

    准备将 Django 连接到 MySQL,在命令行输入命令 python manage.py makemigrations 后报错: AttributeError: 'str' object has ...

随机推荐

  1. C#中查看当前Request是否使用代理的一种方法

    在程序中设置了代理,但是不知道如何判断是否真的使用了该代理, 在Visual Studio中可以使用以下方式来查看: 设置了代理 -> 在代码中WebRequest的实例处设置断点 -> ...

  2. LOJ6045 雅礼集训 2017 Day8 价(最小割)

    由Hall定理,任意k种减肥药对应的药材数量>=k.考虑如何限制其恰好为k,可以将其看作是使对应的药材数量尽量少. 考虑最小割.建一个二分图,左边的点表示减肥药,右边的点表示药材.减肥药和其使用 ...

  3. BZOJ5297 [CQOI2018] 交互网络 【MatrixTree定理】

    题目分析: 这题是一道板题,属于MatrixTree定理的简单拓展,邻接矩阵与有向图邻接矩阵一致,度数矩阵作为入度矩阵.然后高斯消元即可. 代码: #include<bits/stdc++.h& ...

  4. $Min\_25$筛学习笔记

    \(Min\_25\)筛学习笔记 这种神仙东西不写点东西一下就忘了QAQ 资料和代码出处 资料2 资料3 打死我也不承认参考了yyb的 \(Min\_25\)筛可以干嘛?下文中未特殊说明\(P\)均指 ...

  5. 自学Aruba5.3.4-Aruba安全认证-有PEFNG 许可证环境的认证配置802.1x

    点击返回:自学Aruba之路 自学Aruba5.3.4-Aruba安全认证-有PEFNG 许可证环境的认证配置802.1x 1. 采用InterDB认证服务器完成802.1X认证 (Aruba650) ...

  6. [luogu2590][bzoj1036][ZJOI2008]树的统计

    题目描述 一棵树上有n个节点,编号分别为1到n,每个节点都有一个权值w.我们将以下面的形式来要求你对这棵树完成 一些操作: I. CHANGE u t : 把结点u的权值改为t II. QMAX u ...

  7. 洛谷 P4345 [SHOI2015]超能粒子炮·改 解题报告

    P4345 [SHOI2015]超能粒子炮·改 题意 求\(\sum_{i=0}^k\binom{n}{i}\),\(T\)组数据 范围 \(T\le 10^5,n,j\le 10^{18}\) 设\ ...

  8. A1053. Path of Equal Weight

    Given a non-empty tree with root R, and with weight Wi assigned to each tree node Ti. The weight of ...

  9. A1091. Acute Stroke

    One important factor to identify acute stroke (急性脑卒中) is the volume of the stroke core. Given the re ...

  10. HTTP/1.1 100 Continue - I 服了 You

    今天用 c 的 socket() 模拟发送http请求:上传一张图片到服务器. 在本地测试,本地电脑: xp, iis5.1 经过半天时间对 http post file 协议的了解,代码已经写好,测 ...