Thursday, June 30, 2011

Re: Activating HTML error emails while keeping logger defaults

Dear Russel,

Am 14.04.2011 14:13, schrieb Russell Keith-Magee:
> Duplicate the default Django logging settings, and update them as
> required. The defaults are contained in django/conf/global_settings.py

> Unfortunately, there isn't an elegant way to "use the default but just
> modify this one bit".


a kind fellow recently pointed out to me in private email that:


> In project's settings.py, you can just import LOGGING configuration
> dictionary from global_settings and add to it.
> I find it more elegant than duplication. We are not altering settings
> at runtime here, hence it works (with Django 1.3).
> Documentation specifically suggests we can import values from other
> settings files (default included).
>
> from django.conf.global_settings import LOGGING
> LOGGING['handlers']['mail_admins']['include_html'] = True
>


but this seems to be contrary to your statement.

Is there a problem that neither he nor I did see with importing LOGGING as shown above?

Best regards,
Carsten

--
Cafu - the open-source Game and Graphics Engine
for multiplayer, cross-platform, real-time 3D Action
Learn more at http://www.cafu.de

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment