Why is Django throwing error “DisallowedHost at /”?

后端 未结 5 1350
难免孤独
难免孤独 2020-12-13 23:19

I am setting up my own Django server using this Digital Ocean tutorial. I created the Django framework following each step, and ran the server using this command:

         


        
5条回答
  •  伪装坚强ぢ
    2020-12-13 23:41

    For development, you can use the * wildcard to allow all hosts in settings.py:

    ALLOWED_HOSTS = ['*']

    Important

    Modify this configuration when you deploy your app in production environment.

提交回复
热议问题