0

I wanted to run Django server on a hostname in the local system. Django has its own server ... that runs on the localhost:8000 i just want it to run on

cpanel-django.django-project.com:8000

I tried using:

python manage.py runserver cpanel-django.django-project.com:8000

i am getting this error:

Validating models...

0 errors found
March 06, 2014 - 06:21:24
Django version 1.6.2, using settings 'moclient.settings'
Starting development server at http://cpanel-django.django-project.com:8383/
Quit the server with CONTROL-C.
Error: [Errno -5] No address associated with hostname
Nishant Kashyap
  • 819
  • 2
  • 15
  • 25

3 Answers3

0

You need to edit the hosts file and rename localhost to cpanel-django.django-project.com.

Jayanth Koushik
  • 9,476
  • 1
  • 44
  • 52
0

For every host name there is mapping of IP address in your system so that you don't need to worry about IP address, you just need to remember host name.

How to add Host name in your system?

Check this wiki: Host file content

Where to find the file in your system?

Location of file in different system is mentioned here

work_in_progress
  • 747
  • 1
  • 10
  • 27
0

For windows , you can make an entry in hosts file , located in

C:\Windows\System32\drivers\etc\hosts

and update the file with

127.0.0.1 cpanel-django.django-project.com:8383

If you are running on port 80 ,

127.0.0.1 cpanel-django.django-project.com

AkshayK
  • 305
  • 3
  • 4