<commit_before>"""Urls for the zinnia entries"""
from django.conf.urls.defaults import *

from zinnia.models import Entry
from zinnia.settings import PAGINATION
from zinnia.settings import ALLOW_EMPTY
from zinnia.settings import ALLOW_FUTURE


entry_conf_list = {'queryset': Entry.published.all(),
                   'paginate_by': PAGINATION,}

entry_conf = {'queryset': Entry.published.all(),
              'date_field': 'creation_date',
              'allow_empty': ALLOW_EMPTY,
              'allow_future': ALLOW_FUTURE,
              'month_format': '%m'}

entry_conf_year = entry_conf.copy()
entry_conf_year['make_object_list'] = True
del entry_conf_year['month_format']

entry_conf_detail = entry_conf.copy()
del entry_conf_detail['allow_empty']
entry_conf_detail['queryset'] = Entry.objects.all()

urlpatterns = patterns('zinnia.views.entries',
                       url(r'^$', 'entry_index', entry_conf_list,
                           name='zinnia_entry_archive_index'),
                       url(r'^page/(?P<page>\d+)/$', 'entry_index', entry_conf_list,
                           name='zinnia_entry_archive_index_paginated'),
                       url(r'^(?P<year>\d{4})/$', 'entry_year',
                           entry_conf_year, name='zinnia_entry_archive_year'),
                       url(r'^(?P<year>\d{4})/(?P<month>\d{2})/$', 'entry_month',
                           entry_conf, name='zinnia_entry_archive_month'),
                       url(r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/$', 'entry_day',
                           entry_conf, name='zinnia_entry_archive_day'),
                       )

urlpatterns += patterns('django.views.generic.date_based',
                        url(r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/(?P<slug>[-\w]+)/$',
                            'object_detail', entry_conf_detail, name='zinnia_entry_detail'),
                        )
<commit_msg>setting a special template name for the index page, allowing more customisation<commit_after>"""Urls for the zinnia entries"""
from django.conf.urls.defaults import *

from zinnia.models import Entry
from zinnia.settings import PAGINATION
from zinnia.settings import ALLOW_EMPTY
from zinnia.settings import ALLOW_FUTURE


entry_conf_index = {'queryset': Entry.published.all(),
                    'paginate_by': PAGINATION,
                    'template_name': 'zinnia/entry_archive.html'}

entry_conf = {'queryset': Entry.published.all(),
              'date_field': 'creation_date',
              'allow_empty': ALLOW_EMPTY,
              'allow_future': ALLOW_FUTURE,
              'month_format': '%m'}

entry_conf_year = entry_conf.copy()
entry_conf_year['make_object_list'] = True
del entry_conf_year['month_format']

entry_conf_detail = entry_conf.copy()
del entry_conf_detail['allow_empty']
entry_conf_detail['queryset'] = Entry.objects.all()


urlpatterns = patterns('zinnia.views.entries',
                       url(r'^$', 'entry_index', entry_conf_index,
                           name='zinnia_entry_archive_index'),
                       url(r'^page/(?P<page>\d+)/$', 'entry_index', entry_conf_index,
                           name='zinnia_entry_archive_index_paginated'),
                       url(r'^(?P<year>\d{4})/$', 'entry_year',
                           entry_conf_year, name='zinnia_entry_archive_year'),
                       url(r'^(?P<year>\d{4})/(?P<month>\d{2})/$', 'entry_month',
                           entry_conf, name='zinnia_entry_archive_month'),
                       url(r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/$', 'entry_day',
                           entry_conf, name='zinnia_entry_archive_day'),
                       )

urlpatterns += patterns('django.views.generic.date_based',
                        url(r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/(?P<slug>[-\w]+)/$',
                            'object_detail', entry_conf_detail, name='zinnia_entry_detail'),
                        )

{'fraction_non_alphanumeric': 0.1535373808329152, 'fraction_numerical': 0.004515805318615153, 'mean_word_length': 2.401877133105802, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, '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': '2189902', 'n_tokens_mistral': 1287, 'n_tokens_neox': 1264, 'n_words': 173}