'A context manager that temporarily sets the internal client\'s DSN'

@contextmanager
def dsn(self, dsn):

    from raven.contrib.django.models import client
    try:
        client.set_dsn(dsn)
        (yield)
    finally:
        client.set_dsn(None)
