Create 204 response in detect ip view

This commit is contained in:
Bastian Blank 2013-10-18 00:11:04 +02:00
parent 570dc4f94a
commit 09e31209f1
3 changed files with 1 additions and 4 deletions

View File

@ -52,9 +52,7 @@ def DetectIpView(request, secret=None):
key = check_ip(ipaddr)
s[key] = ipaddr
s.save()
with open(os.path.join(settings.STATIC_ROOT, "1px.gif"), "rb") as f:
image_data = f.read()
return HttpResponse(image_data, mimetype="image/png")
return HttpResponse(status=204)
def basic_challenge(realm, content='Authorization Required'):

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -20,7 +20,6 @@ setup(
packages=find_packages(exclude=['_tests', ]),
package_data={
'nsupdate': [
'static/*.gif',
'static/*.html',
'static/css/*',
'static/screenshots/*',