Bläddra i källkod

Revert "HUE-8905 [core] Apply HUE-8772 to Django-1.11.22 for fixing 'user is missing in mako context'"

This reverts commit cf717de5cd857701535c754cb242a97f08bd9214.
Ying Chen 6 år sedan
förälder
incheckning
9014bfa9b9
1 ändrade filer med 2 tillägg och 27 borttagningar
  1. 2 27
      desktop/core/ext-py/Django-1.11.22/django/template/context.py

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

@@ -228,25 +228,6 @@ class RenderContext(BaseContext):
                 self.pop()
 
 
-from django.utils.module_loading import import_string
-_standard_context_processors = None
-
-# This is a function rather than module-level procedural code because we only
-# want it to execute if somebody uses RequestContext.
-def get_standard_processors():
-    from django.conf import settings
-    global _standard_context_processors
-    if _standard_context_processors is None:
-        processors = []
-        collect = []
-        collect.extend(_builtin_context_processors)
-        collect.extend(settings.GTEMPLATE_CONTEXT_PROCESSORS)
-        for path in collect:
-            func = import_string(path)
-            processors.append(func)
-        _standard_context_processors = tuple(processors)
-    return _standard_context_processors
-
 class RequestContext(Context):
     """
     This subclass of template.Context automatically populates itself using
@@ -261,18 +242,12 @@ class RequestContext(Context):
         self._processors = () if processors is None else tuple(processors)
         self._processors_index = len(self.dicts)
 
-        updates = dict()
-        #@TODO@ Prakash to Implement context processor
-        for processor in get_standard_processors():
-            updates.update(processor(request))
-        self.update(updates)
-
         # placeholder for context processors output
-        #self.update({})
+        self.update({})
 
         # empty dict for any new modifications
         # (so that context processors don't overwrite them)
-        #self.update({})
+        self.update({})
 
     @contextmanager
     def bind_template(self, template):