Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Web Technology by (19.9k points)

I use Django 1.6.5 in my program txsite with the settings:

DEBUG = True

I set DEBUG to False, but when I runserver, I get the following error:

CommandError: You must set settings.ALLOWED_HOSTS if DEBUG is False

I tried setting ALLOWED_HOSTS = ['127.0.0.1', 'localhost'] but I get the same error.

anyone know how to figure it out?

1 Answer

0 votes
by (25.1k points)

Try

ALLOWED_HOSTS = ['*']

Less secure if you're not firewalled off or on a public LAN, but it's what I use and it works.

Related questions

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...