Django DEBUG = False로 인한 문제 django - Setting DEBUG = False causes 500 Error

869 단어
세팅스.py의 DEBUG가False로 설정된 전면 페이지가 제대로 표시되지 않음
DEBUG = False
TEMPLATE_DEBUG = False
ALLOWED_HOSTS = ['*']
Django 1.5 introduced the allowed hosts setting that is required for security reasons. A settings file created with Django 1.5 has this new section which you need to add:
# Hosts/domain names that are valid for this site; required if DEBUG is False # See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts ALLOWED_HOSTS = []

Add your host here like ['www.beta800.net'] or ['*'] for a quick test, but don't use ['*'] for production.

좋은 웹페이지 즐겨찾기