Re: Make template caching a feature of the Django template engine

2016-04-16 Thread Sven R. Kunze
Hi everybody, Tim pointed me to this discussion here and I support the overall goal. It accelerates development, especially when designing somewhat prettier Web pages. Quoting my quite naive approach from the issue tracker (https://code.djangoproject.com/ticket/26507#comment:2): """ I don't kn

Re: Make template caching a feature of the Django template engine

2015-12-18 Thread Aymeric Augustin
On 18 déc. 2015, at 16:21, Tim Graham wrote: > Seems okay to me, but what about the point "It would also be useful to have > caching enabled in development so the template loading behaviour is (mostly) > the same in development as it is in production.” Would it be feasible to > always enable t

Re: Make template caching a feature of the Django template engine

2015-12-18 Thread Preston Timmons
When I created my initial branch for this, it was easy enough to auto reload a file once it changed, but it was difficult to deal with template directory precedence. For instance, if `admin/base.html` was cached, but a custom `admin/base.html` was added in a loader or directory with higher prec

Re: Make template caching a feature of the Django template engine

2015-12-18 Thread Tim Graham
Seems okay to me, but what about the point "It would also be useful to have caching enabled in development so the template loading behaviour is (mostly) the same in development as it is in production." Would it be feasible to always enable the cached template loader and control the proposed "au

Re: Make template caching a feature of the Django template engine

2015-12-11 Thread Aymeric Augustin
Hello, I would suggest to enable the cached template loader by default when DEBUG = False and no ‘loaders’ options is specified. This is technically backwards-incompatible, but: - people who don’t usually configure it will get a free performance boost in production - people who do will be able

Re: Make template caching a feature of the Django template engine

2015-12-11 Thread Tim Graham
I like the functionality this provides, but the API doesn't seem quite right to me -- namely passing configuration for template loaders through OPTIONS. Since you mentioned "the weird way of passing arguments to template loaders" and the fact that the locmem loader uses it, I'd pose the questio

Re: Make template caching a feature of the Django template engine

2015-11-26 Thread Jaap Roes
Yes, more or less. Although it's not strictly required to deprecate the cached template loader. However if we can deprecate the cached template loader I'd also like to deprecate the weird way of passing arguments to template loaders https://github.com/django/django/blob/master/django/template/

Re: Make template caching a feature of the Django template engine

2015-11-24 Thread Marc Tamlyn
So. If I understand correctly, this would deprecate the existing cached template loader, replace it with a more powerful, debug ready version (on by default?). Assuming this is what you mean, I wholeheartedly support this. There's no reason not to be performant by default. Marc On 23 Nov 2015 2:16

Make template caching a feature of the Django template engine

2015-11-23 Thread Jaap Roes
It’s considered a good practice to enable template caching in Django. It saves on the overhead of loading and parsing templates and turning them into template objects, which can give a nice performance boost when repeatedly rendering the same templates. Currently it’s possible to enable templat