{% extends "sentry/partial/client_config/python_base.html" %}

{% load i18n %}

{% block inner %}
    <p>{% blocktrans with 'http://pythonpaste.org/deploy' as link %}A filter factory for <a href="{{ link }}">PasteDeploy</a> exists to allow easily inserting Raven into a WSGI pipeline:{% endblocktrans %}</p>

    <pre>
[pipeline:main]
pipeline =
    raven
    tm
    MyApp

[filter:raven]
use = egg:raven#raven
dsn = http://public:secret@example.com/1
include_paths = my.package, my.other.package
exclude_paths = my.package.crud
    </pre>
    <p>{% trans " In the <em>[filter:raven]</em> section, you must specify the entry-point for raven with the <em>use =</em> key. All other raven client parameters can be included in this section as well." %}</p>


    <p>{% trans "Add the following lines to your project's <em>.ini</em> file to setup <em>SentryHandler</em>:" %}</p>

    <pre>
[loggers]
keys = root, sentry

[handlers]
keys = console, sentry

[formatters]
keys = generic

[logger_root]
level = INFO
handlers = console, sentry

[logger_sentry]
level = WARN
handlers = console
qualname = sentry.errors
propagate = 0

[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic

[handler_sentry]
class = raven.handlers.logging.SentryHandler
args = ('http://public:secret@example.com/1',)
level = WARNING
formatter = generic

[formatter_generic]
format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
datefmt = %H:%M:%S
    </pre>

{% endblock %}
