<commit_before>"""
sentry.conf.urls
~~~~~~~~~~~~~~~~

These are additional urls used by the Sentry-provided web server

:copyright: (c) 2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import

import os

try:
    from django.conf.urls import include, patterns, url
except ImportError:
    # django < 1.5 compat
    from django.conf.urls.defaults import include, patterns, url  # NOQA
from django.contrib import admin
from django.views.defaults import page_not_found

from sentry.web.urls import urlpatterns as web_urlpatterns
from sentry.web.frontend.csrf_failure import CsrfFailureView


admin.autodiscover()
admin_media_dir = os.path.join(os.path.dirname(admin.__file__), 'media')

handler404 = lambda x: page_not_found(x, template_name='sentry/404.html')


def handler500(request):
    """
    500 error handler.

    Templates: `500.html`
    Context: None
    """
    from django.template import Context, loader
    from django.http import HttpResponseServerError

    context = {'request': request}

    t = loader.get_template('sentry/500.html')
    return HttpResponseServerError(t.render(Context(context)))


def handler_healthcheck(request):
    from django.http import HttpResponse
    return HttpResponse('ok')


urlpatterns = patterns('',
    url(r'^admin/', include(admin.site.urls)),
    url(r'^500/', handler500, name='error-500'),
    url(r'^404/', handler404, name='error-400'),
    url(r'^healthcheck/', handler_healthcheck, name='healthcheck'),
    url(r'^403-csrf-failure/', CsrfFailureView.as_view(), name='error-403-csrf-failure'),
) + web_urlpatterns
<commit_msg>Changed healtcheck url to avoid conflicts<commit_after>"""
sentry.conf.urls
~~~~~~~~~~~~~~~~

These are additional urls used by the Sentry-provided web server

:copyright: (c) 2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import

import os

try:
    from django.conf.urls import include, patterns, url
except ImportError:
    # django < 1.5 compat
    from django.conf.urls.defaults import include, patterns, url  # NOQA
from django.contrib import admin
from django.views.defaults import page_not_found
from django.http import HttpResponse

from sentry.web.urls import urlpatterns as web_urlpatterns
from sentry.web.frontend.csrf_failure import CsrfFailureView


admin.autodiscover()
admin_media_dir = os.path.join(os.path.dirname(admin.__file__), 'media')

handler404 = lambda x: page_not_found(x, template_name='sentry/404.html')


def handler500(request):
    """
    500 error handler.

    Templates: `500.html`
    Context: None
    """
    from django.template import Context, loader
    from django.http import HttpResponseServerError

    context = {'request': request}

    t = loader.get_template('sentry/500.html')
    return HttpResponseServerError(t.render(Context(context)))


def handler_healthcheck(request):
    return HttpResponse('ok')


urlpatterns = patterns('',
    url(r'^admin/', include(admin.site.urls)),
    url(r'^500/', handler500, name='error-500'),
    url(r'^404/', handler404, name='error-400'),
    url(r'^_health/$', handler_healthcheck, name='healthcheck'),
    url(r'^403-csrf-failure/', CsrfFailureView.as_view(), name='error-403-csrf-failure'),
) + web_urlpatterns

{'fraction_non_alphanumeric': 0.12555654496883348, 'fraction_numerical': 0.028495102404274265, 'mean_word_length': 4.673400673400673, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2191786', 'n_tokens_mistral': 1119, 'n_tokens_neox': 1030, 'n_words': 271}