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

from blog import views

urlpatterns = patterns('',
                       url(r'^$', views.home),
                       url(r'^(?P<pid>\d+)/(?P<slug>[-\w\d]+)$', views.post),
                       url(r'^category/(?P<slug>[-\w\d]+)$', views.category),
                       url(r'^archives/(?P<year>\d+)$',
                           views.archive),
                       url(r'^archives/(?P<year>\d+)/(?P<month>\d+)$',
                           views.archive)
)<commit_msg>Add redirects for old urls at /c and /a<commit_after>from django.conf.urls import patterns, url
from django.views.generic import RedirectView

from blog import views

urlpatterns = patterns('',
                       url(r'^$', views.home),
                       url(r'^(?P<pid>\d+)/(?P<slug>[-\w\d]+)$', views.post),

                       url(r'^category/(?P<slug>[-\w\d]+)/$', views.category),
                       url(r'^c/(?P<slug>[-\w\d]+)/$',
                           RedirectView.as_view(pattern_name='blog.views.category')),

                       url(r'^archives/(?P<year>\d+)/$',
                           views.archive, name="archives_year"),
                       url(r'^a/(?P<year>\d+)/$',
                           RedirectView.as_view(pattern_name='archives_year')),

                       url(r'^archives/(?P<year>\d+)/(?P<month>\d+)/$',
                           views.archive, name="archives_month"),
                       url(r'^a/(?P<year>\d+)/(?P<month>\d+)/$',
                           RedirectView.as_view(pattern_name='archives_month')),
)
{'fraction_non_alphanumeric': 0.19851576994434136, 'fraction_numerical': 0.0, 'mean_word_length': 1.5723370429252783, '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': '2913290', 'n_tokens_mistral': 529, 'n_tokens_neox': 490, 'n_words': 62}