Hi Aymeric, Nice work on the DEP. I tend to agree with Carl that I like a 'NAME' key in TEMPLATES rather than requiring the use of OrderedDict, but I can also see why you don't. I think it might simply the implementation if TEMPLATES was always a list of dictionaries rather than allowing it to be a dict or an OrderedDict. But if you decide not to go that route: if Django iterates over a plain dict to select a template, it seems that could result in some weird performance issues, e.g. if a page that expects template loader 'A' and sometimes tries 'A' as the first loader, sometimes as the second, etc (assuming there is some performance penalty for trying a loader and not finding the template). If it were me, I think I'd always enforce ordering if len(TEMPLATES) > 1 as Carl suggested. If the only downside is the ugliness of OrderedDict, well I think it might save some headaches and support queries.
Tim On Wednesday, November 5, 2014 5:45:09 PM UTC-5, Aymeric Augustin wrote: > > > On 5 nov. 2014, at 09:42, Aymeric Augustin < > [email protected] <javascript:>> wrote: > > > > I'll let you know when I have a specification ready for review. > > > I just pushed an implementation plan for shortcuts and template responses. > > Search for `render(request, template_name` in the DEP or look at the > history in > > https://github.com/aaugustin/mtefd/commits/master/multiple-template-engines.rst > > > -- > Aymeric. -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" 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/75c9709e-fcb4-4304-be42-63c7412fb66c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
