<commit_before>from django.conf.urls import include, url
from django.views.generic import TemplateView

from kuma.attachments.feeds import AttachmentsFeed

from . import feeds
from . import views


# These patterns inherit (?P<document_path>[^\$]+).
document_patterns = [
    url(r'^$',
        views.document,
        name='wiki.document'),
    url(r'^\$revision/(?P<revision_id>\d+)$',
        views.revision,
        name='wiki.revision'),
    url(r'^\$history$',
        views.document_revisions,
        name='wiki.document_revisions'),
    url(r'^\$edit$',
        views.edit_document,
        name='wiki.edit_document'),
    url(r'^\$edit/(?P<revision_id>\d+)$',
        views.edit_document,
        name='wiki.new_revision_based_on'),
    url(r'^\$compare$',
        views.compare_revisions,
        name='wiki.compare_revisions'),
    url(r'^\$children$',
        views.get_children,
        name='wiki.get_children'),
    url(r'^\$flag',
        views.flag,
        name='wiki.flag_document'),
    url(r'^\$translate$',
        views.translate,
        name='wiki.translate'),
    url(r'^\$locales$',
        views.select_locale,
        name='wiki.select_locale'),
    url(r'^\$json$',
        views.json_view,
        name='wiki.json_slug'),
    url(r'^\$styles$',
        views.styles_view,
        name='wiki.styles'),
    url(r'^\$toc$',
        views.toc_view,
        name='wiki.toc'),
    url(r'^\$move$',
        views.move,
        name='wiki.move'),
    url(r'^\$quick-review$',
        views.quick_review,
        name='wiki.quick_review'),
    url(r'^\$samples/(?P<sample_id>.+)/files/(?P<attachment_id>\d+)/(?P<filename>.+)$',
        views.raw_code_sample_file,
        name='wiki.raw_code_sample_file'),
    url(r'^\$samples/(?P<sample_id>.+)$',
        views.code_sample,
        name='wiki.code_sample'),
    url(r'^\$revert/(?P<revision_id>\d+)$',
        views.revert_document,
        name='wiki.revert_document'),
    url(r'^\$repair_breadcrumbs$',
        views.repair_breadcrumbs,
        name='wiki.repair_breadcrumbs'),
    url(r'^\$delete$',
        views.delete_document,
        name='wiki.delete_document'),
    url(r'^\$restore$',
        views.restore_document,
        name='wiki.restore_document'),
    url(r'^\$purge$',
        views.purge_document,
        name='wiki.purge_document'),

    # Un/Subscribe to document edit notifications.
    url(r'^\$subscribe$',
        views.subscribe_document,
        name='wiki.subscribe_document'),

    # Vote helpful/not helpful
    url(r'^\$vote',
        views.helpful_vote,
        name="wiki.document_vote"),
]

urlpatterns = [
    # Un/Subscribe to locale 'ready for review' notifications.
    url(r'^/ckeditor_config.js$',
        views.ckeditor_config,
        name='wiki.ckeditor_config'),

    # internals
    url(r'^.json$',
        views.json_view,
        name='wiki.json'),
    url(r'^/preview-wiki-content$',
        views.preview_revision,
        name='wiki.preview'),
    url(r'^/move-requested$',
        TemplateView.as_view(
            template_name='wiki/move_requested.html'),
        name='wiki.move_requested'),
    url(r'^/get-documents$',
        views.autosuggest_documents,
        name='wiki.autosuggest_documents'),
    url(r'^/load/$', 'load_documents', name='wiki.load_documents'),
<commit_msg>Bug 1180970 - Fixed load_documents URL pattern to refer to view callable and not view name.<commit_after>from django.conf.urls import include, url
from django.views.generic import TemplateView

from kuma.attachments.feeds import AttachmentsFeed

from . import feeds
from . import views


# These patterns inherit (?P<document_path>[^\$]+).
document_patterns = [
    url(r'^$',
        views.document,
        name='wiki.document'),
    url(r'^\$revision/(?P<revision_id>\d+)$',
        views.revision,
        name='wiki.revision'),
    url(r'^\$history$',
        views.document_revisions,
        name='wiki.document_revisions'),
    url(r'^\$edit$',
        views.edit_document,
        name='wiki.edit_document'),
    url(r'^\$edit/(?P<revision_id>\d+)$',
        views.edit_document,
        name='wiki.new_revision_based_on'),
    url(r'^\$compare$',
        views.compare_revisions,
        name='wiki.compare_revisions'),
    url(r'^\$children$',
        views.get_children,
        name='wiki.get_children'),
    url(r'^\$flag',
        views.flag,
        name='wiki.flag_document'),
    url(r'^\$translate$',
        views.translate,
        name='wiki.translate'),
    url(r'^\$locales$',
        views.select_locale,
        name='wiki.select_locale'),
    url(r'^\$json$',
        views.json_view,
        name='wiki.json_slug'),
    url(r'^\$styles$',
        views.styles_view,
        name='wiki.styles'),
    url(r'^\$toc$',
        views.toc_view,
        name='wiki.toc'),
    url(r'^\$move$',
        views.move,
        name='wiki.move'),
    url(r'^\$quick-review$',
        views.quick_review,
        name='wiki.quick_review'),
    url(r'^\$samples/(?P<sample_id>.+)/files/(?P<attachment_id>\d+)/(?P<filename>.+)$',
        views.raw_code_sample_file,
        name='wiki.raw_code_sample_file'),
    url(r'^\$samples/(?P<sample_id>.+)$',
        views.code_sample,
        name='wiki.code_sample'),
    url(r'^\$revert/(?P<revision_id>\d+)$',
        views.revert_document,
        name='wiki.revert_document'),
    url(r'^\$repair_breadcrumbs$',
        views.repair_breadcrumbs,
        name='wiki.repair_breadcrumbs'),
    url(r'^\$delete$',
        views.delete_document,
        name='wiki.delete_document'),
    url(r'^\$restore$',
        views.restore_document,
        name='wiki.restore_document'),
    url(r'^\$purge$',
        views.purge_document,
        name='wiki.purge_document'),

    # Un/Subscribe to document edit notifications.
    url(r'^\$subscribe$',
        views.subscribe_document,
        name='wiki.subscribe_document'),

    # Vote helpful/not helpful
    url(r'^\$vote',
        views.helpful_vote,
        name="wiki.document_vote"),
]

urlpatterns = [
    # Un/Subscribe to locale 'ready for review' notifications.
    url(r'^/ckeditor_config.js$',
        views.ckeditor_config,
        name='wiki.ckeditor_config'),

    # internals
    url(r'^.json$',
        views.json_view,
        name='wiki.json'),
    url(r'^/preview-wiki-content$',
        views.preview_revision,
        name='wiki.preview'),
    url(r'^/move-requested$',
        TemplateView.as_view(
            template_name='wiki/move_requested.html'),
        name='wiki.move_requested'),
    url(r'^/get-documents$',
        views.autosuggest_documents,
        name='wiki.autosuggest_documents'),
    url(r'^/load/$',
        views.load_documents,
        name='wiki.load_documents'),

{'fraction_non_alphanumeric': 0.17345422116527942, 'fraction_numerical': 0.0010404280618311534, 'mean_word_length': 2.7033571821684093, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '5958010', 'n_tokens_mistral': 2308, 'n_tokens_neox': 2247, 'n_words': 278}