Stating defaults add complexity when reading the code but does not change Django's behaviour.

Django defines a set of default values that can be overridden in the settings file.

Explicitly overriding the default values with the same value as the default value is redundant.

Redundant settings increase noise when developers are reading the settings file, making the code harder to maintain.

If our GitHub code review bot spots this issue in your pull request it gives this advice:

django-doctorbotsuggested changes just now
settings.py
1
+
MIDDLEWARE =[
2
+
    "django.contrib.sessions.middleware.SessionMiddleware",
3
+
    "django.middleware.common.CommonMiddleware",
4
+
    ...
5
+
]
6
+
USE_TZ = False

Stating defaults add complexity when reading the code but does not change Django's behaviour.

Read more
Suggested changes
-
USE_TZ = False
Commit suggestion
Update settings.py

Instantly check if you have this issue for free

    Works with tools you use

    Read about how it works.