Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Django Basics What a View! What Are URLs?

Don't really understand

I can't get my head around this, but from what I understand, we've set up a server, and this is the address? I'm following along in Pycharm, and it's there I've been editing our learning_site. I kept getting errors when I tried going to '' in my browser, so I went into settings.py and added '' to the ALLOWED HOSTS, and now I can see 'Hello World' when on Is this address only accessible from my laptop? How would someone else access this? Would I need to add another device's IP address to ALLOWED HOSTS for them to access it? What if multiple people were working on this project? If anyone could help me by giving me a rundown of how we've created this server address and how we're connecting to it, had a look through a few posts on Stackoverflow but still can't get my head around it.

Christopher De Lette
Christopher De Lette
Courses Plus Student 7,139 Points

Hi Ross,

Mind you this is only coming from my background as a Network Admin dealing with routers and switchs, not from a Server side. The address means a default route, or anyone can access because of the masking/matching rule on a subnet. By adding this entry into your servers settings entry you've basically allowed any PC's/connected devices in your LAN to access this server on said port (which happens to be 8000, hijacked from 8080 <--- web port). From what i understand if you wanted to allow outside access you would bind the address to your outside interface for public access (not recommended on your local LAN unless you have the proper security in place) or host it. For development you could allow outside access by port forwarding the port to your development server in your router/modem.

If anyone can elaborate on the Python/Django piece of Ross' question please so i can understand as well.

Hope this somewhat clears things up and didn't muddy the water more.

Take care!

1 Answer

Haydar Al-Rikabi
Haydar Al-Rikabi
5,971 Points

This link within the community forum may have the answer to your question: https://teamtreehouse.com/community/run-server