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
here is a short one liner to accomplish this:
request.META.get('HTTP_X_FORWARDED_FOR', request.META.get('REMOTE_ADDR', '')).split(',')[0].strip()