Hi, Is there a reason to not always store the debug information? Performance? Why have two behaviors?
Thanks, Collin On Sun, Feb 15, 2015 at 9:15 AM, Aymeric Augustin < [email protected]> wrote: > Hello, > > During the multiple template engines refactor, I didn’t touch > TEMPLATE_DEBUG. > The only purpose of this setting is to control whether Django stores the > information required to display stack traces for exceptions that occur > while > rendering Django templatse. I think I should have deprecated it for the > following reasons. > > 1) Having the debug option of Django template engines default to DEBUG > instead > of TEMPLATE_DEBUG will allow everyone to remove TEMPLATE_DEBUG = DEBUG from > their settings. > > 2) For the uncommon situation where one needs TEMPLATE_DEBUG != DEBUG, the > new > TEMPLATES settings provides a solution: > > TEMPLATES = [ > { > 'BACKEND': 'django.template.backends.django.DjangoTemplates', > 'OPTIONS': { > 'debug': True, > }, > }, > ] > > There should be only one way to do it and TEMPLATES beats TEMPLATE_DEBUG. > > 3) That will save developers of third-party backends from thinking about > the > semantics of TEMPLATE_DEBUG vs. DEBUG. At best it's a pointless exercise > and > at worst it will introduce inconsistencies. For example the maintainer of > django-jinja is about to diverge from Django in this regard: > https://github.com/niwibe/django-jinja/issues/87 > > I would like to update the DEP and make this change in Django 1.8 beta. > > What do you think? > > -- > 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/45CFE41A-16D5-4A6B-AF27-505C3E4BEA75%40polytechnique.org > <https://groups.google.com/d/msgid/django-developers/45CFE41A-16D5-4A6B-AF27-505C3E4BEA75%40polytechnique.org?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CAFO84S4oWUg_r9Tb3NXQb723RWrTUHgw3jtH3ikvSt3sadtnRw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
