Skip to content

Commit

Permalink
fix: squash context_processors.request DjangoTemplates warning
Browse files Browse the repository at this point in the history
The Django IDA yields an error like:

    ?: (admin.W411) 'django.template.context_processors.request' must be enabled in DjangoTemplates (TEMPLATES) in order to use the admin navigation sidebar.

Squash this error by adding request information to the DjangoTemplate context.
  • Loading branch information
pshiu committed Jun 9, 2022
1 parent c177e82 commit ef0f03d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def root(*path_fragments):
)

# TEMPLATE CONFIGURATION
# See: https://docs.djangoproject.com/en/2.2/ref/settings/#templates
# See: https://docs.djangoproject.com/en/3.2/ref/settings/#templates
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
Expand All @@ -162,6 +162,7 @@ def root(*path_fragments):
'django.template.context_processors.debug',
'django.template.context_processors.i18n',
'django.template.context_processors.media',
'django.template.context_processors.request',
'django.template.context_processors.static',
'django.template.context_processors.tz',
'django.contrib.messages.context_processors.messages',
Expand Down

0 comments on commit ef0f03d

Please sign in to comment.