#24234: Create Context object in a separate method
-------------------------------------+-------------------------------------
     Reporter:  AlexHill             |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Template system      |                  Version:  1.8alpha1
     Severity:  Normal               |               Resolution:
     Keywords:  multiple-template-   |             Triage Stage:  Accepted
  engines                            |
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by aaugustin):

 One of the goals of the Multiple Template Engines project was not to give
 preferential treatment to the Django Template Language. I wouldn't like to
 document a specific API in the Django backend.

 If you ignore all the deprecation stuff, you end up with a few lines of
 straightforward code that you could easily copy-paste in DjPj:

 {{{
     if request is None:
         context = Context(context)
     else:
         # The following pattern is required to ensure values from
         # context override those from template context processors.
         original_context = context
         context = RequestContext(request)
         if original_context:
             context.push(original_context)
 }}}

 Extracting all the logic from `render` into another function doesn't make
 a lot of sense either.

 Count me as -0 here.

--
Ticket URL: <https://code.djangoproject.com/ticket/24234#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.1cb871d6684a76c3f23e9c0a404dd04a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to