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

ImportError: cannot import name 'is_authenticated' with Django REST Framework 3.7.x #1563

Closed
jeremystretch opened this issue Oct 6, 2017 · 4 comments
Labels
type: bug A confirmed report of unexpected behavior in the application

Comments

@jeremystretch
Copy link
Member

Issue type

[ ] Feature request
[x] Bug report
[ ] Documentation

Environment

  • Python version: 3.4.3
  • NetBox version: 2.1.5

Description

Django REST Framework 3.7.0 was released today. This release removes compatibility code (originally added to support out-of-date Django versions) which we are using in one of the utility classes.

Workaround

Install a DRF release prior to 3.7.0:

pip3 install djangorestframework==3.6.4
@jeremystretch jeremystretch added the type: bug A confirmed report of unexpected behavior in the application label Oct 6, 2017
@dirtycajunrice
Copy link
Contributor

dirtycajunrice commented Oct 6, 2017

posted an hour before i could. This workaround does not apply to the beta 2.2 release. Installing and then reverting the framework is fine on 2.1.5. Causes a "reported to administrator error" on beta2

@jeremystretch
Copy link
Member Author

@dirtycajunrice I have no issue running v2.2-beta2 with DRF 3.6.4. What is the error being reported?

@dirtycajunrice
Copy link
Contributor

dirtycajunrice commented Oct 6, 2017

@jeremystretch
Error:
image

That reads like the ./upgrade.sh is not adding the postgres table if im not mistaken

@dirtycajunrice
Copy link
Contributor

Fixed it by forcing requirements.txt to djangorestframework==3.6.4

Seems that once the error occurs with 3.7.0 it does not run migrations.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

2 participants