<commit_before>from django.conf.urls import patterns, include, url

from django.contrib import admin
from django.views.generic import TemplateView

from candidates.views import (ConstituencyPostcodeFinderView,
    ConstituencyNameFinderView, ConstituencyDetailView,
    ConstituencyDetailCSVView, CandidacyView,
    CandidacyDeleteView, NewPersonView, UpdatePersonView, RevertPersonView,
    MergePeopleView, PersonView, PartyDetailView, PartyListView,
    HelpApiView, HelpAboutView,
    ConstituencyListView, RecentChangesView, LeaderboardView,
    AskForCopyrightAssigment)
from .feeds import RecentChangesFeed

urlpatterns = patterns('',
    url(r'^$', ConstituencyPostcodeFinderView.as_view(), name='finder'),
    url(r'^lookup/name$', ConstituencyNameFinderView.as_view(), name='lookup-name'),
    url(r'^lookup/postcode$', ConstituencyPostcodeFinderView.as_view(), name='lookup-postcode'),
    url(r'^constituencies$', ConstituencyListView.as_view(), name='constituencies'),
    url(r'^constituency/(?P<mapit_area_id>\d+)/(?P<ignored_slug>.*).csv$',
        ConstituencyDetailCSVView.as_view(),
        name='constituency_csv'),
    url(r'^constituency/(?P<mapit_area_id>\d+)/(?P<ignored_slug>.*)$',
        ConstituencyDetailView.as_view(),
        name='constituency'),
    url(r'^candidacy$',
        CandidacyView.as_view(),
        name='candidacy-create'),
    url(r'^candidacy/delete$',
        CandidacyDeleteView.as_view(),
        name='candidacy-delete'),
    url(r'^person/create/$',
        NewPersonView.as_view(),
        name='person-create'),
    url(r'^person/(?P<person_id>\d+)/update$',
        UpdatePersonView.as_view(),
        name='person-update'),
    url(r'^person/(?P<person_id>\d+)/revert$',
        RevertPersonView.as_view(),
        name='person-revert'),
    url(r'^person/(?P<person_id>\d+)/merge$',
        MergePeopleView.as_view(),
        name='person-merge'),
    url(r'^person/(?P<person_id>\d+)(?:/(?P<ignored_slug>.*))?$',
        PersonView.as_view(),
        name='person-view'),
    url(r'^party/(?P<organization_id>[a-z-]+:\d+)/(?P<ignored_slug>.*)$',
        PartyDetailView.as_view(),
        name='party'),
    url(r'^parties/?$',
        PartyListView.as_view(),
        name='party-list'),
    url(r'^recent-changes$',
        RecentChangesView.as_view(),
        name='recent-changes'),
    url(r'^leaderboard$',
        LeaderboardView.as_view(),
        name='leaderboard'),
    url(r'^numbers/', include('cached_counts.urls')),
    url(r'^moderation/', include('moderation_queue.urls')),
    url(r'^feeds/changes.xml', RecentChangesFeed(), name='changes_feed'),
    url(r'^help/api', HelpApiView.as_view(), name='help-api'),
    url(r'^help/about', HelpAboutView.as_view(), name='help-about'),
    url(r'^help/privacy',
        TemplateView.as_view(template_name="candidates/privacy.html"),
        name='help-privacy'),
    url(r'^copyright-question',
        AskForCopyrightAssigment.as_view(),
        name='ask-for-copyright-assignment'),
    url(r'^admin/', include(admin.site.urls)),
)<commit_msg>Don't import each name from candidate.views individually<commit_after>from django.conf.urls import patterns, include, url

from django.contrib import admin
from django.views.generic import TemplateView

import candidates.views as views

from .feeds import RecentChangesFeed

urlpatterns = patterns('',
    url(r'^$', views.ConstituencyPostcodeFinderView.as_view(), name='finder'),
    url(r'^lookup/name$', views.ConstituencyNameFinderView.as_view(), name='lookup-name'),
    url(r'^lookup/postcode$', views.ConstituencyPostcodeFinderView.as_view(), name='lookup-postcode'),
    url(r'^constituencies$', views.ConstituencyListView.as_view(), name='constituencies'),
    url(r'^constituency/(?P<mapit_area_id>\d+)/(?P<ignored_slug>.*).csv$',
        views.ConstituencyDetailCSVView.as_view(),
        name='constituency_csv'),
    url(r'^constituency/(?P<mapit_area_id>\d+)/(?P<ignored_slug>.*)$',
        views.ConstituencyDetailView.as_view(),
        name='constituency'),
    url(r'^candidacy$',
        views.CandidacyView.as_view(),
        name='candidacy-create'),
    url(r'^candidacy/delete$',
        views.CandidacyDeleteView.as_view(),
        name='candidacy-delete'),
    url(r'^person/create/$',
        views.NewPersonView.as_view(),
        name='person-create'),
    url(r'^person/(?P<person_id>\d+)/update$',
        views.UpdatePersonView.as_view(),
        name='person-update'),
    url(r'^person/(?P<person_id>\d+)/revert$',
        views.RevertPersonView.as_view(),
        name='person-revert'),
    url(r'^person/(?P<person_id>\d+)/merge$',
        views.MergePeopleView.as_view(),
        name='person-merge'),
    url(r'^person/(?P<person_id>\d+)(?:/(?P<ignored_slug>.*))?$',
        views.PersonView.as_view(),
        name='person-view'),
    url(r'^party/(?P<organization_id>[a-z-]+:\d+)/(?P<ignored_slug>.*)$',
        views.PartyDetailView.as_view(),
        name='party'),
    url(r'^parties/?$',
        views.PartyListView.as_view(),
        name='party-list'),
    url(r'^recent-changes$',
        views.RecentChangesView.as_view(),
        name='recent-changes'),
    url(r'^leaderboard$',
        views.LeaderboardView.as_view(),
        name='leaderboard'),
    url(r'^numbers/', include('cached_counts.urls')),
    url(r'^moderation/', include('moderation_queue.urls')),
    url(r'^feeds/changes.xml', RecentChangesFeed(), name='changes_feed'),
    url(r'^help/api', views.HelpApiView.as_view(), name='help-api'),
    url(r'^help/about', views.HelpAboutView.as_view(), name='help-about'),
    url(r'^help/privacy',
        TemplateView.as_view(template_name="candidates/privacy.html"),
        name='help-privacy'),
    url(r'^copyright-question',
        views.AskForCopyrightAssigment.as_view(),
        name='ask-for-copyright-assignment'),
    url(r'^admin/', include(admin.site.urls)),
)
{'fraction_non_alphanumeric': 0.18311291963377416, 'fraction_numerical': 0.0, 'mean_word_length': 4.151965065502184, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '4496000', 'n_tokens_mistral': 2041, 'n_tokens_neox': 1995, 'n_words': 216}