Open marcelor opened 6 years ago
Note: To get the old behavior (when using on_delete was allowed) we should use on_delete=models.CASCADE
It is actually already a warning in 1.11
Let's do a PR for that :)
@triat Any other compatibility issues for Django 2.0 that we need to address?
I did an other PR for compatibility but not related to Django 2.0 #93
Thanks @triat I merged it in!
File "/home/michal/Desktop/project/enviroment/lib/python3.5/site-packages/rest_framework_tracking/mixins.py", line 53, in initial
if user.is_anonymous():
TypeError: 'bool' object is not callable
User.is_anonymous() is no longer supported as method in Django 2.0
I'll check tomorrow if I can do an other PR, thanks @tored11
If I understand correctly if not user.is_authenticated:
is preferred. The second is that these are read-only attributes and not methods to call.
@avelis You are correct.
@triat any updates on this issue? I am having the same issue 'bool' object is not callable
@ulad Not yet. The update is pretty straightforward. Just haven't had the time on hand to make a PR for review to do it. I suppose I could just edit the file directly though.
@avelis yes I already did so. Thanks
@avelis it seems it requires a bit more things to do (adapt tests) because if you just change it, everything crash. I started a branch to work on and add new tox tests with the new DRF and django2
I made the pull request for "bool" object is not callable... https://github.com/aschn/drf-tracking/pull/99
Is there any workaround available for this until the fix is not provided?
@luvpreetsingh You can try install the latest from source
Thank you!
We need to add the now required on_delete attribute to the user ForeignKey in the BaseAPIRequestLog.