#15102: find_template returns compiled Template object instead of template 
source
---------------------------------------------+------------------------------
          Reporter:  vmanchev                |         Owner:  vmanchev         
            
            Status:  assigned                |     Milestone:                   
            
         Component:  Template system         |       Version:  1.2              
            
        Resolution:                          |      Keywords:  find_template 
template source
             Stage:  Design decision needed  |     Has_patch:  1                
            
        Needs_docs:  0                       |   Needs_tests:  0                
            
Needs_better_patch:  0                       |  
---------------------------------------------+------------------------------
Comment (by vmanchev):

 Replying to [comment:5 ramiro]:
 > Just to be clear (because I realise I wasn't): I meant
 `find_template_source` function entered a deprecation path in from that
 commit (r11862) and 1.2 (the release that followed it).
 >
 > Replying to [comment:4 vmanchev]:
 > > Replying to [comment:3 ramiro]:
 > > > Before r11862 there was no `find_template` function or method and
 the `find_template_source` function entered a deprecation path so there
 was no unintended backward incompatible change but a explicit decision to
 not provide a way to access to the source code of the template.
 > > >
 > > I'm not sure why this decision was taken and why these methods
 were/are still in code in this case?
 >
 > Because that's how the deprecation policy works. A feature is removed
 after three releases. but use of that feature prints gradually noisier
 warnings (the ones you are seeing).
 >
 Yes, I understand this - that's why I want to get on the right track by
 resolving these deprecation warnings.

 > > Indeed, I don't really need `find_template_source`, we're using
 `find_template` which returns template source if using
 `django.template.loaders.app_directories.load_template_source` and
 `django.template.loaders.filesystem.load_template_source` as
 TEMPLATE_LOADERS.
 > >
 >
 > This is the part I don't understand, you say you were using
 `TEMPLATE_LOADERS =
 ['django.template.loaders.app_directories.load_template_source'', '
 django.template.loaders.filesystem.load_template_source']`  and that
 indicates Django 1.1 or older (becase class based template loaders didn't
 exist then) but you also say you were using `find_template()` that didn't
 exist until 1.2. It's not clear to me what Django version are you porting
 your project from.
 >
 > Related to this: We forgot to add a note about the new class based
 loaders to the 1.2 release notes, that is ticket #14038.

 Well, obviously the reason why we were using the old template loaders is
 that the documentation has not been updated and that passed unnoticed.
 Therefore, project is being ported from Django 1.2 to Django 1.3.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/15102#comment:6>
Django <http://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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to