{% if settings.USING_RUNSERVER %} {% if settings.DEBUG == False %}

You are seeing this message because you are using the Django runserver and the DEBUG setting is False.

Runserver should not be used in the production.

If you do not see page the styling - set DEBUG = True or use --insecure flag with the runserver command.

To serve the static media in the production:

  • configure your webserver to alias the urls starting with {{ settings.STATIC_URL }} to the directory {{ settings.STATIC_ROOT }};
  • run python manage.py collectstatic.

  • {% endif %} {% else %} {% if settings.DEBUG == True %}

    Debug mode is on, do not use it in the production. To turn it off, set DEBUG = False in your settings.py file.

    {% endif %} {% endif %}