简体   繁体   English

django.contrib.auth get_user_model无法使用monitio app

[英]django.contrib.auth get_user_model isn't working with monitio app

i have to set up some big project to start working on it, but i don't have access to its creator, so i have nobody to ask. 我必须建立一个大项目来开始工作,但我没有访问它的创建者,所以我没有人问。

This project make use of monitio app to handle notifications. 该项目利用monitio app处理通知。

And i got this error: 我收到了这个错误:

File "******/local/lib/python2.7/site-packages/monitio/models.py", line 1, in <module>
    from django.contrib.auth import get_user_model
ImportError: cannot import name get_user_model

I have no idea, why it isn't working, since there is everything installed. 我不知道,为什么它不起作用,因为安装了所有东西。 Maybe i miss something related to virtualenv or something. 也许我想念与virtualenv有关的东西。 I suppose that maybe in some weird way monitio has not access to django.contrib.auth or smthg. 我想也许以某种奇怪的方式,monitio无法访问django.contrib.auth或smthg。 Anyway im lost. 无论如何我输了。

Every piece of advice will be appreciated Thanks in advance 每一条建议都将受到赞赏

May be its because of your Django version problem, 可能是因为你的Django版本问题,

Which Django version your using? 您使用哪个Django版本?

In requirements.txt of Django-monitio said that they are using django>=1.6. 在Django-monitio的requirements.txt中,他们说他们使用的是django> = 1.6。 And also see the other requirements in the requirements.txt 另请参阅requirements.txt中的其他要求

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM