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

Support for Django 1.6 #56

Merged
merged 6 commits into from Dec 18, 2013
Merged

Conversation

eculver
Copy link
Contributor

@eculver eculver commented Nov 22, 2013

This is adds support for Django 1.6. Specifically, this addresses #51, #53 and #55 by providing support for model serialization prior to storing as session data as well as adjusting form validation code to deal with a regression in the way scope is parsed.

Feedback welcomed.

…ialization. This addresses the issues in Django 1.6 involving new session storage backend behavior.
@@ -6,11 +6,12 @@

from django.db import models
from django.conf import settings
from django.core import serializers
from django.contrib.auth import get_user_model

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why you import this? You are not using and this not works fine in models.py only in views.py

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. For some reason, my linter missed this. Removing...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DELETE_EXPIRED fits into this category too (finally fixed my linter plugin :P)

eculver added a commit that referenced this pull request Dec 18, 2013
@eculver eculver merged commit 3e76954 into caffeinehit:master Dec 18, 2013
@eculver eculver deleted the compat/django-1.6 branch December 18, 2013 20:33
@juliomalegria
Copy link

Is there a way to get these changes using pip (pip install django-oauth2-provider)? I have the release 0.2.6 which doesn't contain them and I don't see any new release after that.

@eculver
Copy link
Contributor Author

eculver commented Jan 15, 2014

We're working on getting the next release out. I wish I had a timeline for it, but I think that @flashingpumpkin may need to step in.

@@ -154,7 +154,7 @@ def test_authorization_requires_a_valid_scope(self):
self.get_client().client_id,
constants.SCOPES[0][1]))
response = self.client.get(self.auth_url2())
self.assertEqual(200, response.status_code)
# self.assertEqual(200, response.status_code)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should just be uncommented. I've made the change in 6b5bc0d. Good catch!

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no problem. I was just looking at this patch cause I had the same problem described in the issue. Any chance this fix can go into a stable release soon so that I can use Django 1.6 with this package?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm hoping so. I'm still waiting to obtain ownership of the package in PyPI. @flashingpumpkin may have more to say on this, but at the moment, my hands are tied.

Once I have ownership, I will cut a release immediately.

eculver added a commit to eculver/django-oauth2-provider that referenced this pull request Mar 18, 2014
…ted out whilst adding support for Django 1.6.
@monokrome
Copy link

Any updates on this? @flashingpumpkin @eculver

@darkness51
Copy link

I install using pip from this way:

pip install -e git://route-to-github-repo

ysavary pushed a commit to epyx-src/django-oauth2-provider that referenced this pull request Nov 20, 2014
* master: (29 commits)
  caffeinehit#56 - Uncomment an assertion in scope tests. It was commented out whilst adding support for Django 1.6.
  Fix get_access_token failing on single tracker mode after token refresh (caffeinehit#70).
  Removing django 1.3 from tox and travis-ci matrices since it's no longer officially supported.
  Fixing silly bug in test wrapper's django version detection.
  caffeinehit#55 - Update travis-ci config to include Django 1.6.
  Django 1.6 detection for test wrapper script.
  caffeinehit#55 - Removing another unnecessary import.
  caffeinehit#55 - Removing unnecessary imports.
  caffeinehit#55 Adding Django 1.6 to tox coverage matrix.
  caffeinehit#55 - Fallback to simplejson in older versions of Django.
  Fixes caffeinehit#55 - Handle non-list/non-tuple form field values for scope introduced in Django 1.6
  caffeinehit#51 caffeinehit#53 - Support for model serialization/deserialization. This addresses the issues in Django 1.6 involving new session storage backend behavior.
  Fix caffeinehit#26 by checking for invalid data before attempting access.
  Use `constants` instead of going directly through settings when invalidating tokens and grants. This also replaces 'clean' with 'delete' for the new setting to be more clear as to what's being done under the hood.
  implement OAUTH_CLEAN_EXPIRED, clean as you go
  Adding a License section to README.
  Fixes caffeinehit#32 - Add `token_type` to access token response to conform to section 4.2.2 of the OAuth 2.0 specification.
  caffeinehit#29 - Remove trailing slash that was causing installs to fail on Windows.
  Addressing caffeinehit#28 by replacing the BSD license reference with MIT to match what's in the repo.
  Bumping version to 0.2.7-dev to avoid ambiguity in an established package.
  ...

Conflicts:
	provider/__init__.py
	provider/oauth2/views.py
@eswenson1
Copy link

@flashingpumpkin @eculver Is this package still being supported? It has been a while since any commits and there are lots of outstanding PRs and issues. This package appears to be the recommended OAuth2 support package for django-rest-framework, but I wonder if that should change, since this package appears stagnant. Any status update?

@blag
Copy link

blag commented Feb 25, 2015

@eswenson1 This upstream project appears to be completely dead. The most active forks are @mapmyfitness' fork and @glassresistor's fork.

I wish there was some way to point PyPI to a different repo when projects die.

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

Successfully merging this pull request may close these issues.

None yet

8 participants