Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with Django 2.0 #85

Open
marcelor opened this issue Dec 2, 2017 · 17 comments
Open

Compatibility with Django 2.0 #85

marcelor opened this issue Dec 2, 2017 · 17 comments

Comments

@marcelor
Copy link

marcelor commented Dec 2, 2017

We need to add the now required on_delete attribute to the user ForeignKey in the BaseAPIRequestLog.

@marcelor
Copy link
Author

marcelor commented Dec 2, 2017

Note: To get the old behavior (when using on_delete was allowed) we should use on_delete=models.CASCADE

@triat
Copy link
Contributor

triat commented Dec 3, 2017

It is actually already a warning in 1.11

Let's do a PR for that :)

@avelis
Copy link
Collaborator

avelis commented Dec 28, 2017

@triat Any other compatibility issues for Django 2.0 that we need to address?

@triat
Copy link
Contributor

triat commented Jan 3, 2018

I did an other PR for compatibility but not related to Django 2.0 #93

@avelis
Copy link
Collaborator

avelis commented Jan 3, 2018

Thanks @triat I merged it in!

@MichalGumkowski
Copy link

  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

@triat
Copy link
Contributor

triat commented Jan 14, 2018

I'll check tomorrow if I can do an other PR, thanks @tored11

@avelis
Copy link
Collaborator

avelis commented Jan 15, 2018

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.

@MichalGumkowski
Copy link

@avelis
You are correct.

@ghost
Copy link

ghost commented Jan 29, 2018

@triat any updates on this issue? I am having the same issue 'bool' object is not callable

@avelis
Copy link
Collaborator

avelis commented Jan 29, 2018

@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.

@ghost
Copy link

ghost commented Jan 29, 2018

@avelis yes I already did so. Thanks

@triat
Copy link
Contributor

triat commented Jan 30, 2018

@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

@webbyfox
Copy link

I made the pull request for "bool" object is not callable... #99

@luvpreetsingh
Copy link

Is there any workaround available for this until the fix is not provided?

@avelis
Copy link
Collaborator

avelis commented Jun 6, 2018

@luvpreetsingh You can try install the latest from source

@luvpreetsingh
Copy link

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants