我正在使用Django 2.0。和包fcm-django == 0.2.13
升级到Django 2.0
后,我在lib / python3.6 / site-packages / fcm_django / api / rest_framework.py中发现错误
'bool' object is not callable at the below line
if user is not None and user.is_authenticated():
我在https://github.com/xtrinch/fcm-django/issues/43以及is_authenticated() raises TypeError TypeError: 'bool' object is not callable
找到了解决方案我必须使用lib/python3.6/site-packages/fcm_django/api/rest_framework.py
文件中的is_authenticated(不带括号)替换is_authenticated()。最新的软件包fcm-django == 0.2.13尚未更新此错误。
我已经编辑了文件
/home/test/venv/lib/python3.6/site-packages/fcm_django/api/rest_framework.py 然后我保存文件。
但是当我运行网址时。它在文件rest_framework.py中显示相同的错误
如果用户不是None且user.is_authenticated():
但我已将is_authenticated()更改为is_aunthenticated
为什么django / venv没有反映这些变化?