Python django.conf.settings.DEFAULT_EXCEPTION_REPORTER_FILTER Examples

The following are 7 code examples for showing how to use django.conf.settings.DEFAULT_EXCEPTION_REPORTER_FILTER(). These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example.

You may check out the related API usage on the sidebar.

You may also want to check out all available functions/classes of the module django.conf.settings , or try the search function .

Example 1
Project: luscan-devel   Author: blackye   File: debug.py    License: GNU General Public License v2.0 6 votes vote down vote up
def get_exception_reporter_filter(request):
    global default_exception_reporter_filter
    if default_exception_reporter_filter is None:
        # Load the default filter for the first time and cache it.
        modpath = settings.DEFAULT_EXCEPTION_REPORTER_FILTER
        modname, classname = modpath.rsplit('.', 1)
        try:
            mod = import_module(modname)
        except ImportError as e:
            raise ImproperlyConfigured(
            'Error importing default exception reporter filter %s: "%s"' % (modpath, e))
        try:
            default_exception_reporter_filter = getattr(mod, classname)()
        except AttributeError:
            raise ImproperlyConfigured('Default exception reporter filter module "%s" does not define a "%s" class' % (modname, classname))
    if request:
        return getattr(request, 'exception_reporter_filter', default_exception_reporter_filter)
    else:
        return default_exception_reporter_filter 
Example 2
Project: GTDWeb   Author: lanbing510   File: debug.py    License: GNU General Public License v2.0 5 votes vote down vote up
def get_default_exception_reporter_filter():
    # Instantiate the default filter for the first time and cache it.
    return import_string(settings.DEFAULT_EXCEPTION_REPORTER_FILTER)() 
Example 3
Project: bioforum   Author: reBiocoder   File: debug.py    License: MIT License 5 votes vote down vote up
def get_default_exception_reporter_filter():
    # Instantiate the default filter for the first time and cache it.
    return import_string(settings.DEFAULT_EXCEPTION_REPORTER_FILTER)() 
Example 4
Project: Hands-On-Application-Development-with-PyCharm   Author: PacktPublishing   File: debug.py    License: MIT License 5 votes vote down vote up
def get_default_exception_reporter_filter():
    # Instantiate the default filter for the first time and cache it.
    return import_string(settings.DEFAULT_EXCEPTION_REPORTER_FILTER)() 
Example 5
Project: python   Author: Yeah-Kun   File: debug.py    License: Apache License 2.0 5 votes vote down vote up
def get_default_exception_reporter_filter():
    # Instantiate the default filter for the first time and cache it.
    return import_string(settings.DEFAULT_EXCEPTION_REPORTER_FILTER)() 
Example 6
Project: openhgsenti   Author: drexly   File: debug.py    License: Apache License 2.0 5 votes vote down vote up
def get_default_exception_reporter_filter():
    # Instantiate the default filter for the first time and cache it.
    return import_string(settings.DEFAULT_EXCEPTION_REPORTER_FILTER)() 
Example 7
Project: python2017   Author: bpgc-cte   File: debug.py    License: MIT License 5 votes vote down vote up
def get_default_exception_reporter_filter():
    # Instantiate the default filter for the first time and cache it.
    return import_string(settings.DEFAULT_EXCEPTION_REPORTER_FILTER)()