title: When I submit a form in django (or access admin) the address changes in URL bar to an ip address
body: <p>I have the following set up.</p>
  
  <p>On my dns: 
  an A name record that points my domain to an IP addres</p>
  
  <p>On my server:
  nginx -> gunicorn -> django</p>
  
  <p>But when I submit a form (e.g. log in form) the address in the URL bar changes from my domain name to my IP address. This causes a Cross Domain Error. </p>
  
  <p>This happens on forms and when I access mydomain/admin</p>
  
  <p>when I access pages my domain name in the URL bar remains intact. When I go to mydomain/admin it automatically switches to the IP w/o submitting any other forms. Any other time I have to submit a form for it to change to the IP address. </p>
  
  <p>All my media and everything use mydomain in the path. It is the strangest thing. I only first noticed it when I went to my admin page, but didnt think much of it. But I just added a few forms and now I can't submit the forms because the forms try to submit to the IP address causing the cross domain error. </p>
  
  <p>I should add teh forms are auto generated by django-registration. </p>