Django Development server inaccessible from the browser

42 views
Skip to first unread message

ngn zone

unread,
Nov 24, 2017, 5:12:22 AM11/24/17
to Django users
Hello all, 
   
  I have a very strange experience with my Development server. 
1. I ran python manage.py makemigrations and it was successful

2. I ran python manage.py migrate every ran successful to my postgresql db

3. I ran python manage.py runserver everything successfu with following output attched to this post.

4. When I head over to my web browser and type localhost:8000

5. The browser shows this site can't be access.

6. when I run other projects on the same computer it runs just fine but for the afore mentioned.
   I am running my project on virtualenv.

7. I am using linux mint 17 django 1.11.2

My Question is, what is wrong with my code that permits migrations and the development server to run without errors but on the browser I cannot access any url of my project?

Desperately waiting for your help.
Screenshot.png

Harish Oraon

unread,
Nov 24, 2017, 9:29:32 AM11/24/17
to Django users
This might be your settings, please confirm

DEBUG=False
ALLOWED_HOST = []

Try these two
a)
   DEBUG = True
   ALLOWED_HOST = []
b)
   DEBUG = False
   ALLOWED_HOST = ['localhost', '127.0.0.1',]

Dylan Reinhold

unread,
Nov 24, 2017, 9:39:14 AM11/24/17
to django...@googlegroups.com
Is your development server the same machine you are running your browser from?

If not you don't want to use localhost, you need to user the IP/domain name of the development server.

What is the error you get in the browser?

Dylan

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/2bf18a17-5427-4b82-9c12-2ca86f9faf4c%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages