<commit_before>from django.conf.urls.defaults import *
import settings
from django.core.exceptions import ImproperlyConfigured


urlpatterns = patterns('blogging.views',
    url(r'^archives/$', 'archives', name='blog-archives'),
    url(r'^archives/(?P<year>\d{4})/(?P<month>\d{2})/$', 'archives_details', name='blog-archives-month'),
    
    url(r'^(?P<category_slug>[-\w]+)/$', 'list_items', name='blog-category'),
    url(r'^(?P<category_slug>[-\w]+)/page-(?P<page>\d+)/$', 'list_items', name='blog-category-page'),
    
    url(r'^page-(?P<page>\d+)/$', 'list_items', name='blog-page'),
    url(r'^$', 'list_items', name='blog-index'),
)

if settings.BLOG_ITEM_URL == 'long':
    urlpatterns += patterns('blogging.views',
        url(r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d+)/(?P<slug>[-\w]+)$', 'item_details', name="blog-item"),
    )
elif settings.BLOG_ITEM_URL == 'yearmonth':
    urlpatterns += patterns('blogging.views',<commit_msg>solved an urls precedence problem<commit_after>from django.conf.urls.defaults import *
import settings
from django.core.exceptions import ImproperlyConfigured


urlpatterns = patterns('blogging.views',
    url(r'^archives/$', 'archives', name='blog-archives'),
    url(r'^archives/(?P<year>\d{4})/(?P<month>\d{2})/$', 'archives_details', name='blog-archives-month'),
    url(r'^page-(?P<page>\d+)/$', 'list_items', name='blog-page'),
    
    url(r'^(?P<category_slug>[-\w]+)/$', 'list_items', name='blog-category'),
    url(r'^(?P<category_slug>[-\w]+)/page-(?P<page>\d+)/$', 'list_items', name='blog-category-page'),
    
    
    url(r'^$', 'list_items', name='blog-index'),
)

if settings.BLOG_ITEM_URL == 'long':
    urlpatterns += patterns('blogging.views',
        url(r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d+)/(?P<slug>[-\w]+)$', 'item_details', name="blog-item"),
    )
elif settings.BLOG_ITEM_URL == 'yearmonth':
    urlpatterns += patterns('blogging.views',
{'fraction_non_alphanumeric': 0.2555844155844156, 'fraction_numerical': 0.004155844155844156, 'mean_word_length': 5.173076923076923, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, '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': '3898982', 'n_tokens_mistral': 748, 'n_tokens_neox': 732, 'n_words': 87}