I like the 'definitely not' to the do nothing option. Thanks to both of you!
On Thu, Aug 6, 2015 at 5:41 PM, Aaron C. de Bruyn <aa...@heyaaron.com> wrote: > 1. DNS doesn't really work that way in most situations. Your browser > should cache it, your computer should cache it (especially Windows), > and your upstream DNS (usually your router) should cache it. Your > computer literally stores 'mysite.com' = '1.2.3.4'. It doesn't store > it per-page, but for the whole domain name. > > 2. How are the URLs generated in your application? If your HTML > template literally has: <A HREF="http://mysite.herokuapp.com/{% url > 'home' %}">Home page</A>....then the only way to update the URLs for > your app would be to edit the template and fix them. If you are > relying on django-sites to 'know' the base URL for your site, go into > the admin section and click on 'Sites'. I think it's best practice to > not prefix my URLs with http://whatever... Just use {% url 'home' %} > as it should return something like '/' for the URL (without > http://mysite.com). > > A. Your ALLOWED_HOSTS setting should probably have both domains if you > want your transition to be smooth. (i.e. the site works through both > URLs). ALLOWED_HOSTS has no affect on what URLs you application > displays. > > B. Definitely not. Tweak, break, learn. ;) > > Hope that helps. > > -A > > > On Thu, Aug 6, 2015 at 2:03 PM, Malik Rumi <malik.a.r...@gmail.com> wrote: > > I have 1 model from my django project up and running on django. Before > > adding more models and content, I wanted to use my actual domain name, > > instead of whatever.herokuapp.com. So after I got that straight, I > realized > > that while the home page was mysite.com, the links were still > > mystite.herokuapp.com, which I think is a problem. But I also thought > there > > had to be an easy fix for this, especially after I saw a post while I was > > searching for solutions that said django only cares about the stuff that > > comes after the domain name. So the first thing I did was change a > hardcoded > > link in my navbar from mysite.herokuapp/newpage to mysite/newpage in my > dev > > site. But testing it the url still said mysite.herokuapp.com/newpage. > Then I > > got an idea, and I just manually changed the url to mysite/newpage and > what > > do you know, it came up correctly. then I clicked around and suddenly all > > the pages on my model are coming up that way, which they were not half an > > hour ago. So the question: What did I do right? > > > > Here are my working theories: > > > > 1. The dns change, which I also did half an hour ago, worked for the home > > page immediately (I tested it at the time) but needed to propagate more > for > > the other pages to work, which they do now. > > > > 2. By changing the url manually, django just fed the pages as requested > > without concern about the domain part of the url. If I start from > > mysite.herokuapp.com home page, the links still come up with that domain > > name. > > > > But how do I make this both universal and permanent? > > > > A. I could change allowed hosts setting, taking the herokuapp part out > > > > B. Do nothing, it works now and I should leave well enough alone. > > > > C. ????? Your answer here ... > > > > > > Thanks > > > > -- > > You received this message because you are subscribed to the Google Groups > > "Django users" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to django-users+unsubscr...@googlegroups.com. > > To post to this group, send email to django-users@googlegroups.com. > > Visit this group at http://groups.google.com/group/django-users. > > To view this discussion on the web visit > > > https://groups.google.com/d/msgid/django-users/3ded9a89-b20f-489d-aadb-667ab62fdb53%40googlegroups.com > . > > For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Django users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/django-users/OMkN_I__30Y/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at http://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CAEE%2BrGrft480OFiVv2%3DMLCqxZk6jwsHWTotXhU1hYS5Yv7LBLw%40mail.gmail.com > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAKd6oBx1iO-QtC3HiGiZ4T9-tK%3Dq2cx_uf%3D6_yOyxZobOyfPcA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.