Just curious, why do we need a third party library to get the IP address, and why does it have to be an ELB (comment above)? Can't you use the normal IP determination of trying HTTP_X_FORWARDED_FOR first (to work with all proxies (including ELB, haproxy, nginx, apache, etc) and then REMOTE_ADDR if that header isn't set?  If it is done that way it should get the right client address whether running from the django dev server/gunicorn direct or from a load balancer.