Skip to content

Debug enabled in production #24

Open
@dansondergaard

Description

@dansondergaard

Hi,

I just noticed that, with the current setup, debug mode is enabled in production. More specifically:

https://github.com/realpython/dockerizing-django/blob/master/web/docker_django/settings.py#L26

should probably be something like DEBUG = True if os.getenv('DEBUG') == 'True' else False. I use this in my own setup and I prefer the default to be False to avoid accidentally enabling debug mode (e.g. if the setting is forgotten in .env).

I know this is only an example, but I think it's better to show people best practices :-)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions