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

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. hibernate 反向生成 实体类

    1,配置数据库连接 步骤. 点击    windows   -> open perspective  - >   myeclipse datebase  Exprorer 打开了dateb ...

  2. lftp 卡在 Making data connection 解决方法

    用lftp连接到一个ftp服务器,执行ls命令结果一直Making data connection. google一下都说执行set ftp:ssl-allow no,但是实测无效. 上lftp官网看 ...

  3. 【BZOJ3529】【SDOI2014】数表

    Time Limit: 1000 ms Memory Limit: 512 MB Description 有一张n×m的数表,其第i行第j列 (1≤i≤n,1≤j≤m)的数值为能同时整除i和j的所有自 ...

  4. [解决]Linux Tomcat启动慢--Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [236,325] milliseconds

    一.背景 今天部署项目到tomcat,执行./startup.sh命令之后,访问项目迟迟加载不出来,查看日志又没报错(其实是我粗心了,当时tomcat日志还没打印完),一开始怀疑是阿里云主机出现问题, ...

  5. Hadoop集群环境安装

    转载请标明出处:  http://blog.csdn.net/zwto1/article/details/45647643:  本文出自:[zhang_way的博客专栏] 工具: 虚拟机virtual ...

  6. tp框架的url模式

    tp框架url地址可以由以下四种 http://网址/index.php?m=XX&c=XX&a=XX   基本get模式 http://网址/index.php/模块/控制器/操作方 ...

  7. ibatis annotations 注解方式返回刚插入的自增长主键ID的值

    mybatis提供了注解方式编写sql,省去了配置并编写xml mapper文件的麻烦,今天遇到了获取自增长主键返回值的问题,发现相关问答比较少,还好最后还是圆满解决了,现把重点记录一下,解决问题的关 ...

  8. python趣味——与MS系列编译器一样强大的Unicode变量名支持

    中文变量名,中文函数名,中文类名等,可惜Python2不支持,但在Python3时代,这些都可以完美支持了. def 中文函数(): return 1

  9. Greetings

    1,Common English Greetings Hey! Hey man! Hey girl! Hi. How's it going? How are you doing? What's up? ...

  10. maven 技术总结

    1.版本统一控制 在 properties中配置一个参数,在添加依赖时 通过 version标签 限定版本 <properties> <org.springframework.ver ...