I'm using Wagtail cms on django framework, problem is localhost address, I want to access to the site running in 127.0.0.1:8000 by localhost? I tried hosts file, but no luck !
Asked
Active
Viewed 3,219 times
0
-
3The question doesn't make sense: **All** IPs starting with 127 are localhost ([127.0.0.0/8](https://en.wikipedia.org/wiki/Localhost)) and that's the IP address (network layer). The port number lives on other layer on OSI model / TCP/IP stack, the transport layer. – Pablo Bianchi Jan 21 '19 at 04:42
2 Answers
0
Per don.joey's comment, you can specify the address and port of your local server with something like: python manage.py runserver 127.0.0.1:8001. If you change the address, you'll have to add it to ALLOWED_HOSTS in your settings file.
BillD
- 21
- 1
- 1
- 2
0
Finally I found the solution: from Wagtail Admin/Settings/Sites/Example site change the site
Homan50
- 1
- 1
- 2
-
2I don't think this is the right solution. You should be adding the port number to your runserver command and not in the database. If you do so in the database and replicate this on a live server, you are in trouble. – don.joey Apr 30 '16 at 07:11