Skip to content

Commit 9014bfa

Browse files
committed
Revert "HUE-8905 [core] Apply HUE-8772 to Django-1.11.22 for fixing 'user is missing in mako context'"
This reverts commit cf717de.
1 parent bde563b commit 9014bfa

File tree

1 file changed

+2
-27
lines changed
  • desktop/core/ext-py/Django-1.11.22/django/template

1 file changed

+2
-27
lines changed

desktop/core/ext-py/Django-1.11.22/django/template/context.py

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -228,25 +228,6 @@ def push_state(self, template, isolated_context=True):
228228
self.pop()
229229

230230

231-
from django.utils.module_loading import import_string
232-
_standard_context_processors = None
233-
234-
# This is a function rather than module-level procedural code because we only
235-
# want it to execute if somebody uses RequestContext.
236-
def get_standard_processors():
237-
from django.conf import settings
238-
global _standard_context_processors
239-
if _standard_context_processors is None:
240-
processors = []
241-
collect = []
242-
collect.extend(_builtin_context_processors)
243-
collect.extend(settings.GTEMPLATE_CONTEXT_PROCESSORS)
244-
for path in collect:
245-
func = import_string(path)
246-
processors.append(func)
247-
_standard_context_processors = tuple(processors)
248-
return _standard_context_processors
249-
250231
class RequestContext(Context):
251232
"""
252233
This subclass of template.Context automatically populates itself using
@@ -261,18 +242,12 @@ def __init__(self, request, dict_=None, processors=None, use_l10n=None, use_tz=N
261242
self._processors = () if processors is None else tuple(processors)
262243
self._processors_index = len(self.dicts)
263244

264-
updates = dict()
265-
#@TODO@ Prakash to Implement context processor
266-
for processor in get_standard_processors():
267-
updates.update(processor(request))
268-
self.update(updates)
269-
270245
# placeholder for context processors output
271-
#self.update({})
246+
self.update({})
272247

273248
# empty dict for any new modifications
274249
# (so that context processors don't overwrite them)
275-
#self.update({})
250+
self.update({})
276251

277252
@contextmanager
278253
def bind_template(self, template):

0 commit comments

Comments
 (0)