-
Notifications
You must be signed in to change notification settings - Fork 259
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
__init__() got an unexpected keyword argument 'mimetype' #77
Comments
any news on this?? i am having the same problem with Django 1.7 |
Same with Django 1.7. It's happening everywhere else I'm trying to return a HttpResponse with a mimetype. So this is not specific to django-oauth2-provider. |
And.. It's because it's now called content_type.. not mimetype and HttpResponse should be called like return HttpResponse(
json.dumps(response_data), content_type='application/json'
) |
I've the same issue here in 1.7 ... anyone have solution?
|
my solution was to start using |
Yes, change line 491 at https://github.com/caffeinehit/django-oauth2-provider/blob/master/provider/views.py#L491 to use content_type instead of mimetype. |
@edmenendez In 1.7 there's a JSONResponse class, I think I used that in the pull request that's linked to this issue. |
#93 fixes this as well. |
+1 on this |
Further to the comment by @edmenendez there are a number of lines in views.py namely: 301, 466 and 491 - the new (v1.7) |
Hi Guys, I followed the recommendations in this thread as a temporary solution for this issue. However, I'm using PIP. Somehow my latest PIP Install didn't include the fix. How do I make sure future PIP installations include the fix for this app? At the moment I'm manually fixing stuff on the server side and on my dev machine after using PIP. I really like PIP so I hope the fix will be available with PIP installation soons. Thanks. |
Further to the comment by @edmenendez and @tomwalters above, changing all instances of the mimetype function parameter and return in views.py as described worked for me. Django 1.7.1 |
Any ideas when this fix will make it in to master and released? |
@kevbradwick Upstream appears to be dead, so maybe never. If you absolutely cannot switch over to using Django OAuth Toolkit, then you should be able to use @glassresistor's zip file or repo. Use
or specify it directly in
Tell
or specify it directly in
And just a heads up: unfortunately |
In Django 1.6, the HttpResponse is like We are just warning and assigning the mimetype to the content_type. In Django 1.8, we are not using mimetype. Instead of this directly we are assigning the value like "image/png", etc.., to the content_type. Just a DRY concept. |
I've the same issue here in 1.6.11
Further to the comment by @edmenendez and @tomwalters above, changing all instances of the mimetype function parameter and return in views.py as described worked for me. Django 1.6.11 at https://docs.djangoproject.com/en/1.9/internals/deprecation/#deprecation-removed-in-1-7 but i can't understand why the warning appear in django 1.6 until i saw the comment by @aravindaran |
Fixed this in https://bitbucket.org/ckarrie/django-piston |
Passing mimetype to HttpResponse is deprecated and removed in Django 1.7 as per django/django@8eadbc5
(https://github.com/caffeinehit/django-oauth2-provider/blob/master/provider/views.py#L491)
The text was updated successfully, but these errors were encountered: