I'm trying to develop an app using Django 1.1 on Webfaction. I'd like to get the IP address of the incoming request, but when I use request.META['REMOTE_ADDR'] it returns 127.0.0.1. There seems to be a number of different ways of getting the address, such as using 
HTTP_X_FORWARDED_FOR or plugging in some middleware called SetRemoteAddrFromForwardedFor. Just wondering what the best approach was?
I use the middleware because this way I don't have to change the app's code. 
If I want to migrate my app to other hosting servers, I only need to modify the middleware without affecting other parts. 
Security is not an issue because on WebFaction you can trust what comes in from the front end server.
Django: What's the correct way to get the requesting IP address?