Merge lp:~maxiberta/django-openid-auth/fix-logo-view into lp:django-openid-auth

Proposed by Maximiliano Bertacchini
Status: Merged
Approved by: Maximiliano Bertacchini
Approved revision: 130
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: lp:~maxiberta/django-openid-auth/fix-logo-view
Merge into: lp:django-openid-auth
Diff against target: 10 lines (+1/-1)
1 file modified
django_openid_auth/views.py (+1/-1)
To merge this branch: bzr merge lp:~maxiberta/django-openid-auth/fix-logo-view
Reviewer Review Type Date Requested Status
Daniel Manrique (community) Approve
Review via email: mp+353710@code.launchpad.net

Commit message

Fix logo view to support Django>=1.7.

Description of the change

This should not affect backward compatibility, as the `content_type` argument to the HttpResponse constructor was added in Django==1.0 [0] as an alias to `mimetype`, which was deprecated in Django==1.5, and removed in Django==1.7 [1].

[0] https://github.com/django/django/commit/0afbca9c60
[1] https://docs.djangoproject.com/en/dev/internals/deprecation/#deprecation-removed-in-1-7

To post a comment you must log in.
Revision history for this message
Daniel Manrique (roadmr) wrote :

Hahaha, talk about old code.

Thanks for going broken-window-fixing on this tiny but annoying bug!

https://en.wikipedia.org/wiki/Broken_windows_theory

review: Approve
Revision history for this message
Otto Co-Pilot (otto-copilot) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'django_openid_auth/views.py'
2--- django_openid_auth/views.py 2018-03-15 18:38:52 +0000
3+++ django_openid_auth/views.py 2018-08-24 13:57:19 +0000
4@@ -333,7 +333,7 @@
5
6 def logo(request):
7 return HttpResponse(
8- OPENID_LOGO_BASE_64.decode('base64'), mimetype='image/gif'
9+ OPENID_LOGO_BASE_64.decode('base64'), content_type='image/gif'
10 )
11
12

Subscribers

People subscribed via source and target branches