Create 204 response in detect ip view
This commit is contained in:
parent
570dc4f94a
commit
09e31209f1
@ -52,9 +52,7 @@ def DetectIpView(request, secret=None):
|
|||||||
key = check_ip(ipaddr)
|
key = check_ip(ipaddr)
|
||||||
s[key] = ipaddr
|
s[key] = ipaddr
|
||||||
s.save()
|
s.save()
|
||||||
with open(os.path.join(settings.STATIC_ROOT, "1px.gif"), "rb") as f:
|
return HttpResponse(status=204)
|
||||||
image_data = f.read()
|
|
||||||
return HttpResponse(image_data, mimetype="image/png")
|
|
||||||
|
|
||||||
|
|
||||||
def basic_challenge(realm, content='Authorization Required'):
|
def basic_challenge(realm, content='Authorization Required'):
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB |
1
setup.py
1
setup.py
@ -20,7 +20,6 @@ setup(
|
|||||||
packages=find_packages(exclude=['_tests', ]),
|
packages=find_packages(exclude=['_tests', ]),
|
||||||
package_data={
|
package_data={
|
||||||
'nsupdate': [
|
'nsupdate': [
|
||||||
'static/*.gif',
|
|
||||||
'static/*.html',
|
'static/*.html',
|
||||||
'static/css/*',
|
'static/css/*',
|
||||||
'static/screenshots/*',
|
'static/screenshots/*',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user