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

from django.views.generic import DetailView, ListView

from core import models

person_patterns = patterns('core.views',
    url(r'^all/',
        ListView.as_view(model=models.Person),
        name='person_list'),
    url(r'^politicians/',
        ListView.as_view(queryset=models.Position.objects.all().current_mp_positions()),
        name='politician_list'),
                           
    # featured person ajax load
    url(r'^featured/(?P<direction>(before|after))/(?P<current_slug>[-\w]+)',
        'featured_person', 
        name='featured_person'),
    
    url(r'^(?P<slug>[-\w]+)/',       'person',       name='person'),
                         )

place_patterns = patterns('core.views',
    url(r'^all/',
        ListView.as_view(model=models.Place),
        name='place_list'),
    url(r'^constituencies/',
        ListView.as_view(queryset=models.Place.objects.all().constituencies()),
        name='constituency_list'),
    url(r'^counties/',
        ListView.as_view(queryset=models.Place.objects.all().counties()),
        name='county_list'),

    url(r'^is/(?P<slug>[-\w]+)/', 'place_kind', name='place_kind'),
    url(r'^(?P<slug>[-\w]+)/$',   'place',      name='place'),

    # Tab content
    url(
        r'^(?P<slug>[-\w]+)/related_person_tab', <commit_msg>Order MP list by place slug<commit_after>from django.conf.urls.defaults import patterns, include, url

from django.views.generic import DetailView, ListView

from core import models

person_patterns = patterns('core.views',
    url(r'^all/',
        ListView.as_view(model=models.Person),
        name='person_list'),
    url(r'^politicians/',
        ListView.as_view(queryset=models.Position.objects.all().current_mp_positions().order_by('place__slug')),
        name='politician_list'),
                           
    # featured person ajax load
    url(r'^featured/(?P<direction>(before|after))/(?P<current_slug>[-\w]+)',
        'featured_person', 
        name='featured_person'),
    
    url(r'^(?P<slug>[-\w]+)/',       'person',       name='person'),
                         )

place_patterns = patterns('core.views',
    url(r'^all/',
        ListView.as_view(model=models.Place),
        name='place_list'),
    url(r'^constituencies/',
        ListView.as_view(queryset=models.Place.objects.all().constituencies()),
        name='constituency_list'),
    url(r'^counties/',
        ListView.as_view(queryset=models.Place.objects.all().counties()),
        name='county_list'),

    url(r'^is/(?P<slug>[-\w]+)/', 'place_kind', name='place_kind'),
    url(r'^(?P<slug>[-\w]+)/$',   'place',      name='place'),

    # Tab content
    url(
        r'^(?P<slug>[-\w]+)/related_person_tab', 
{'fraction_non_alphanumeric': 0.18632416787264833, 'fraction_numerical': 0.0, 'mean_word_length': 2.98989898989899, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '1739544', 'n_tokens_mistral': 935, 'n_tokens_neox': 900, 'n_words': 113}