关注公众号“轻松学编程”了解更多

原因

在使用xadmin时,如果是Django2版本以上的会报这个错误。这是由于xadmin中的文件xadmin\views\dashboard.py里面的函数render()缺少一个参数引起的。

解决方案

虚拟环境\Lib\site-packages\xadmin\views\dashboard.py,打开这个文件
然后在36行处给render()添加一个参数renderer=None,如下图所示

后记

【后记】为了让大家能够轻松学编程,我创建了一个公众号【轻松学编程】,里面有让你快速学会编程的文章,当然也有一些干货提高你的编程水平,也有一些编程项目适合做一些课程设计等课题。

也可加我微信【1257309054】,拉你进群,大家一起交流学习。
如果文章对您有帮助,请我喝杯咖啡吧!

公众号

关注我,我们一起成长~~

TypeError: render() got an unexpected keyword argument ‘renderer‘的更多相关文章

  1. Django TypeError: render() got an unexpected keyword argument 'renderer'

    场景: Xadmin添加plugin 来源: 1. xadmin与DjangoUeditor的安装 (第3.3章节) 2. 增加富文本编辑器Ueditor (第14.7章节) 报错: Django T ...

  2. 记录 TypeError: render() got an unexpected keyword argument 'renderer' 错误

    在网上看到MXShop这个项目,适合Python, Django + drf 进阶的,其中遇到 TypeError: render() got an unexpected keyword argume ...

  3. xamdin: 添加小组件报错: render() got an unexpected keyword argument 'renderer'

    查找到 xadmin里面的 dashboard.py文件内render方法,增加一个rdnderer默认参数是None一般路径在 本机虚拟环境\Lib\site-packages\xadmin\vie ...

  4. Xadmin添加用户小组件出错render() got an unexpected keyword argument 'renderer

    环境: Python 3.5.6 Django 2.1 Xadmin 原因: render函数在django2.1上有变化 解决方案: 1.在Python终端输入命令help('xadmin') 查看 ...

  5. TypeError: parse() got an unexpected keyword argument 'transport_encoding'

    错误: TypeError: parse() got an unexpected keyword argument 'transport_encoding'You are using pip vers ...

  6. TypeError: __init__() got an unexpected keyword argument 't_command'

    python  .\manage.py migrate 报错如下 λ python .\manage.py migrateTraceback (most recent call last): File ...

  7. TypeError: while_loop() got an unexpected keyword argument 'maximum_iterations'

    错误: TypeError: while_loop() got an unexpected keyword argument 'maximum_iterations' 参照https://blog.c ...

  8. TypeError: to_categorical() got an unexpected keyword argument 'nb_classes'

    在学习莫烦教程中keras教程时,报错:TypeError: to_categorical() got an unexpected keyword argument 'nb_classes',代码如下 ...

  9. TypeError: pivot_table() got an unexpected keyword argument 'rows'

    利用Python进行数据分析>第二章,处理MovieLens 1M数据集,有句代码总是报错: mean_rating = data.pivot_table('rating', rows='tit ...

随机推荐

  1. NoActionBar主题下如何添加OptionsMenu

    菜单无法显示 为了不显示标题栏,所以主题使用了 NoActionBar,这也直接导致选项菜单无处显示 解决方案 添加一个ToolBar,自定义标题栏 <androidx.appcompat.wi ...

  2. Centos-远程拷贝-scp

    scp 依赖ssh协议,实现从哟个linux系统拷贝到另一个linux系统 格式 scp -P port localPath user@IP:targetPath # 如果拷贝的是文件则需要传递 -r ...

  3. spring-boot-route(一)Controller接收参数的几种方式

    Controller接收参数的常用方式总体可以分为三类.第一类是Get请求通过拼接url进行传递,第二类是Post请求通过请求体进行传递,第三类是通过请求头部进行参数传递. 1 @PathVariab ...

  4. sipp3.6对freeswitch进行压力测试

    一.安装sipp 1.下载地址: https://github-production-release-asset-2e65be.s3.amazonaws.com/13161657/99df6100-9 ...

  5. Java知识系统回顾整理01基础02面向对象03方法

    一.根据实例给出"方法"的定义 在LOL中,一个英雄可以做很多事情,比如超神,超鬼,坑队友 能做什么在类里面就叫做方法 比如队友残血正在逃跑,你过去把路给别人挡住了,导致他被杀掉. ...

  6. lens distortion

    来源:http://michel.thoby.free.fr/Fisheye_history_short/International_Standards_about_Distortion.html H ...

  7. 计数,dic的创建方式,求九九乘法表

    s1='char,python,nihao,ni,ni,python's=s1.split(',')print(s1)s2=list()for i in s: if i not in s2: s2.a ...

  8. JVM系列【3】Class文件加载过程

    JVM系列笔记目录 虚拟机的基础概念 class文件结构 class文件加载过程 jvm内存模型 JVM常用指令 GC与调优 Class文件加载过程 JVM加载Class文件主要分3个过程:Loadi ...

  9. H264裸码流I/P/B帧类型判别

    花了两天时间做了个h264裸流nal类型和frame类型检测的工具,已上传至github,有需要的自行下载. 1.NAL类型检测 nal类型检测非常容易,对照下表即可容易判断类型. 较常用nal类型包 ...

  10. vue获取下拉框select的值

    1.我写的是循环遍历,然后获取id :value="v.id"这就是获取的id然后打印就可以获取id了