1

When I send a HTTP POST request to create an access token for a user, with parameters client_id, client_secret, username, password etc., to my localhost which has Django (v1.7) running, I get an access token in response.

But when I do the same to Django (v1.7) deployed on Elastic Beanstalk, I get

TypeError at /oauth2/access_token

__init__() got an unexpected keyword argument 'mimetype'

I used to get this error earlier when I was using Django 1.8 but then I downgraded to Django 1.7 and this error got resolved. This all was done locally, in localhost. But when I deployed to beanstalk, I again get this error even though the version deployed there is 1.7.

1 Answer 1

1

This error happen because pass mimetype to HttpResponse was removed of Django 1.7 ( https://github.com/django/django/commit/8eadbc5a03d06f5bfedfa3fad35ad0801d2ab6ff ).

I believe that some possibilities are,

Install with pip

$ pip install https://github.com/glassresistor/django-oauth2-provider/archive/stable.zip#django-oauth2-provider

or add directly in requirements.txt:

-e git+https://github.com/glassresistor/django-oauth2-provider.git#egg=django-oauth2-provider
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.