2

I can't run/debug my project, all the settings is set correctly for debugging mode, but I get an error "You must set settings.ALLOWED_HOSTS if DEBUG is False." I found the similar error and solution, but it's not help me. Probably issue is in PyCharm. Doesn't matter, I set debug true or false, set environment variables, it's still doesn't work.

My config/settings:

DEBUG = True
ALLOWED_HOSTS = [*]

enter image description here

Veaceslav
  • 41
  • 5
  • Does this answer your question? [CommandError: You must set settings.ALLOWED\_HOSTS if DEBUG is False](https://stackoverflow.com/questions/24857158/commanderror-you-must-set-settings-allowed-hosts-if-debug-is-false) – Martin Zeitler Oct 29 '21 at 06:30

1 Answers1

1

I solved this, the problem was in .env file. There was some extra code that caused this error.

Veaceslav
  • 41
  • 5