出现这种错误是因为调用模型对象时使用了变量名,而不是对象名(模型类),例如:

user = UserInfo()
user_li = user.objects.filter(uname=username)

这种调用情况就会报此错误,解决方法是使用对象名调用objects方法

user = UserInfo()
user_li = UserInfo.objects.filter(uname=username)

django报错Manager isn't accessible via UserInfo instances的更多相关文章

  1. orm(Manager isn't accessible via %s instances" % cls.__name)报错

    报错信息 Manager isn't accessible via %s instances" % cls.__name 解决方法 https://www.jianshu.com/p/5e0 ...

  2. Django报错:OSError: raw write() returned invalid length 4 (should have been between 0 and 2)

    在使用Django时Django报错:Django报错:OSError: raw write() returned invalid length 4 (should have been between ...

  3. Django报错:提交表单报错---RuntimeError: You called this URL via POST, but the URL doesn’t end in a slash and you have APPEND_SLASH set.

    Django报错:提交表单报错---RuntimeError: You called this URL via POST, but the URL doesn’t end in a slash and ...

  4. django 报错Reverse for 'detail' with keyword arguments '{'pk': '2'}' not found. 1 pattern(s) tried: ['$post/(?P<pk>[0-9]+)/$']

    Django报错:Reverse for 'detail' with keyword arguments '{'pk': '2'}' not found. 1 pattern(s) tried: [' ...

  5. SpringBoot2整合Shiro报错 UnavailableSecurityManagerException: No SecurityManager accessible to the calling code 【已解决】

    SpringBoot集成Shiro报错 UnavailableSecurityManagerException: No SecurityManager accessible to the callin ...

  6. Django 报错 Reverse for 'content' not found. 'content' is not a valid view function or pattern name.

    Django 报错 Reverse for 'content' not found. 'content' is not a valid view function or pattern name. 我 ...

  7. ubuntu pip 安装django报错解决

    系统版本 ubuntu  Kylin 16.04 LTS       安装pip3 安装 Django 总是提示time out,无法安装. 逛了好多论坛终于遭到了解决办法,分享保存: sudo pi ...

  8. 关于Django报错django.core.exceptions.ImproperlyConfigured: Requested setting DEBUG, but settings are not configure

    报错代码:django.core.exceptions.ImproperlyConfigured: Requested setting DEFAULT_INDEX_TABLESPACE, but se ...

  9. 记一次Django报错Reverse for 'indextwo' with no arguments not found. 1 pattern(s) tried: ['$index/$']

    启动python manage.py runserver 打开127.0.0.1:8000,报错信息如下: Reverse for 'indextwo' with no arguments not f ...

随机推荐

  1. java多线程的常见例子

    收藏 http://blog.csdn.net/wenzhi20102321/article/details/52524545

  2. 32.Django form组件

    Form组件 Django的Form主要具有一下几大功能: 生成HTML标签 验证用户数据(显示错误信息) HTML Form提交保留上次提交数据 初始化页面显示内容 创建Form类时,主要涉及到 [ ...

  3. webpack4: compilation.mainTemplate.applyPluginsWaterfall is not a function 解决方法

    今天捣鼓webpack4踩到一个弥天大坑:使用html-webpack-plugin打包html的时候一直报 compilation.mainTemplate.applyPluginsWaterfal ...

  4. Java的大数计算BigNumber

    Notice that the number 123456789 is a 9-digit number consisting exactly the numbers from 1 to 9, wit ...

  5. Could not get dialect instance.

    一般此错误都是和数据库有关,请确认数据库配置文件是否配置正确,或者确认数据库是否连接正常

  6. Windows 8 系统快捷键热键列表收集

    值得收藏参考的 Windows 8 系统快捷键热键列表收集大全汇总,键盘党效率党必备啊! 相信不少喜欢接触新鲜软件的同学都已经给电脑安装上Windows 8 操作系统了吧!这个系统优秀与否我们暂且不讨 ...

  7. vue v-for输出表格结构

    v-for输出表格结构 数据库结构如下: 原理: 两个数组 a, b,  数组a的值,是数组b的键(索引), 变量拼接(红色区域): <table> <tr> <th v ...

  8. linux学习之路--(三)文件系统

    一.文件系统 rootfs:根文件系统 FHS:linux /boot:系统启动相关的文件,如内核.initrd,grub(bootloader) /dev:设备文件:不存储内容,就是个访问入口 块设 ...

  9. vue实现懒加载的几种方法

    vue实现惰性加载是基于: 1.ES6的异步机制 components: { comp: (resolve, reject) => {} } 2. webpack的代码分割功能 require. ...

  10. 笔记:Maven 设置代理配置

    如果公司基于安全因素考虑,要求使用通过安全认证的代理服务器访问因特网,这种情况夏,需要为 Maven 配置HTTP代理,才能让他正常访问外部仓库,配置代理服务器需要在~/.ms2/settings.x ...