Django rewrites URL as IP address in browser - why?
Solution 1:
Its probably your mod_rpaf config, I'm guessing the "RPAFsethostname On" line in particular.
I'm not fully confident because after googling for 10 minutes its clear that there is little to no documentation anywhere on mod_rpaf. It seems to be the kind of thing you would only ever hear about in a handful of "me and my fancy stack" blog posts. It solves a problem that you can just as easily solve in your django layer and not run some mystery apache module by some guy you read about on some blog post.
Its actually covered in the middleware chapter of the book: http://www.djangobook.com/en/2.0/chapter17/