开发者

What do I need to run Sentry inside my django site

The sentry source code has a wsgi.py which uses some defaults in server.py. My goal is to run sentry as part of my django site. But I am not linking to the wsgi.py in apache2's sites-enabled. Should I copy the contents of server.py into my own settings.py to get it to work ? Currently by not doing anything, the values of the SECRET_KEY and SENTRY_KEY are different. T开发者_高级运维hus the client is unable to post exceptions to the sentry server.


One thing to make sure of is that you have added sentry and raven to your INSTALLED_APPS in settings.py (after doing pip install sentry).

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    # Uncomment the next line to enable the admin:
    'django.contrib.admin',
    # Uncomment the next line to enable admin documentation:
    # 'django.contrib.admindocs',
    'sentry',
    'raven.contrib.django',
)

Also, make sure you add sentry to your urls.py with:

url(r'^sentry/',include('sentry.web.urls')),
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜