Created
August 19, 2013 14:24
-
-
Save dpnova/6269712 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.http import HttpResponse | |
EMPTY_GIF_BYTES = 'GIF89a\x01\x00\x01\x00\xf0\x00\x00\xb0\x8cZ\x00\x00\x00!\xf9\x04\x00\x00\x00\x00\x00,\x00\x00\x00\x00\x01\x00\x01\x00\x00\x02\x02D\x01\x00;' | |
def record_page_view(request): | |
response = HttpResponse(EMPTY_GIF_BYTES) #need 1pixel gif here | |
response['Content-Type'] = 'image/gif' | |
return response |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment