How do I get user\'s IP in django?
I have a view like this:
# Create your views
from django.contrib.gis.utils import GeoIP
from django.template impor
In django.VERSION (2, 1, 1, 'final', 0) request handler
sock=request._stream.stream.raw._sock
#
client_ip,port=sock.getpeername()
if you call above code twice,you may got
AttributeError("'_io.BytesIO' object has no attribute 'stream'",)
AttributeError("'LimitedStream' object has no attribute 'raw'")