python manage.py runserver <ipaddress>:8000
In a common case, it might be:
python manage.py runserver 192.168.1.3:8000
You can then connect to it via that ip address instead, so if you are
SSHing to another machine, you can access the dev server even though
it's over the network. Just keep in mind that it'll be accessible to
anyone who can see that machine.
Your /etc/hosts don't define ip addresses, they define hostnames-- it
seems like you understood it backwards.
> If it's any help, I'd actually rather be running Apache +
> mod_python... you know, make your development and production
> environments as similar as possible...
>
This really isn't necessary when working with an initial Django project.
It's possible to use an apache instance with mod_python for development,
but it is nowhere near as convenient as the Django dev server. At least
for initial developing of Django projects, I'd recommend you stick with
the dev server-- it is there to help you be more productive and keep
things from getting in your way.
Hopefully this helps!
Jeff Anderson
Erik
Next question: Is there a way to set up this development server as a
service so I don't have to start it from a terminal each time?
I typically do a long-term development session for a day or two...
then go off an do another project for a while (a couple days.) So I'd
shut everything down.
At this advanced age, I'll likely forget to start the dev server up
again when I begin another dev session, and then post a dozen messages
pretty much like the one that started this thread. :) I would guess
I'd get the hang of it by, oh, December.
It's also just 'icky' having a terminal window open, just hanging
here. 'spose I can just move it to another panel, huh?
Maybe when I finish the Dj book I'll be able to complete my
Apache/mod_python config. (I started it last night... bad idea,
configuring something new late Sat night.)
Thx all!