2013/12/8 Jonathan Slenders <[email protected]>

> Do we ever intend to implement something like collect_templates in the
> future? Similar to collect_static?
>

I think that for this reason exists the cache template loader, it is
something similar. With this template loader every template is only
compiled one time.

https://docs.djangoproject.com/en/dev/ref/templates/api/#django.template.loaders.cached.Loader

 But I think it is another subject.



> If so, implementing this would break collect_templates or the similarity
> that we currently have in how app directories are processed.
> This is actually the monkey-patching way of writing templates.
>
> Probably a weak argument. I'm still against, but practically beats purity.
>
>
>
> Le samedi 7 décembre 2013 18:07:18 UTC+1, Florian Apolloner a écrit :
>
>> Hi,
>>
>> there is no need to convince us that this feature would be nice to have;
>> the ticket is accepted… I left a comment on the ticket page; and I think we
>> should do this in one patch instead of two, so we can get the API right
>> (Especially since I am not sure if skipping the loaders is the correct
>> approach).
>>
>> Cheers,
>> Florian
>>
>> On Saturday, December 7, 2013 1:06:30 PM UTC+1, Goinnn wrote:
>>>
>>> 2013/12/6 German Larrain <[email protected]>
>>>
>>>> On Friday, December 6, 2013 11:36:00 AM UTC-3, unai wrote:
>>>>>
>>>>> Lot of app/CMS creators create base templates for their apps.
>>>>> Currently, if one
>>>>> of those templates needs some kind of change, the user needs to copy
>>>>> the
>>>>> template all over again, making it difficult to update their templates
>>>>> when
>>>>> they update their apps (they would need to copy the new template and
>>>>> then make
>>>>> their customizations again).
>>>>>
>>>>> Skipping the current template loader means that they would be able to
>>>>> create
>>>>> their own template (with the same path as the app template), extend it
>>>>> to
>>>>> itself and only change the blocks that need to be changed.
>>>>>
>>>>
>>>>  I would love this feature because I've faced the mentioned problems.
>>>>
>>>
>>> I really like it this feature. I have used this feature from 3 years
>>> ago, through an external app [1], in a lot of projects and never I had any
>>> problem with it. The more relevant project have been the Malaga University
>>> website [2].
>>>
>>> Without this feature looks like that Django despises the template code,
>>> because If you want to update a little thing of a reusable app
>>> (django.contrib.admin, django-mptt, django-tables2 etc) in your project
>>> (The most common usecase for this feature) you have to overwrite the
>>> complete template [3]. With this feature you will be able to do something
>>> like the before example, you will be able to overwrite only some blocks (or
>>> one block) of a template.
>>>
>>>
>>> REF's
>>>
>>> 1. 
>>> https://pypi.python.org/pypi/django-smart-extends/<https://pypi.python.org/pypi/django-smart-extends/0.5>
>>> 2. http://www.uma.es/
>>> 3. http://www.agnostic-library.com/ma/wp-content/
>>> uploads/2012/01/Dont-Copy-Paste.png
>>>
>>> Best regards,
>>>
>>> --
>>>
>>> Pablo Martín
>>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Django developers" 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].
> Visit this group at http://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/d7060744-95c5-464c-a5bd-1a7d38b30432%40googlegroups.com
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" 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].
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CALNyWLGU9Bb-tXK0tOJ11XO2XRu4vy48pGsV%2B0mTGe22UzR%3DNg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to