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

from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    (r'^admin/', include(admin.site.urls)),
    (r'^accounts/login/', 'django.contrib.auth.views.login'),
    url(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}, name='auth_logout'),
    (r'^assopy/$', 'conference.views.genro_wrapper'),
    (r'^p3/gmap.js$', 'p3.views.gmap'),
    (r'^i18n/', include('django.conf.urls.i18n')),
    (r'^blog/', include('microblog.urls')),
    (r'^conference/', include('conference.urls')),
    (r'^comments/', include('django.contrib.comments.urls')),
    (r'^hcomments/', include('hcomments.urls')),
)

if 'rosetta' in settings.INSTALLED_APPS:
    urlpatterns += patterns('',
        url(r'^rosetta/', include('rosetta.urls')),
    )

if settings.DEBUG:
    import os.path
    args = []
    for k, path in settings.STATIC_DIRS.items():
        args.append((
            r'^static/%s/(?P<path>.*)$' % k,
            'django.views.static.serve',
            {'document_root': os.path.join(path, k), 'show_indexes': True}
        ))
    from conference.settings import CONFERENCE_STUFF_URL, CONFERENCE_STUFF_DIR
    args.append((
        r'^%s(?P<path>.*)$' % CONFERENCE_STUFF_URL[1:],
        'django.views.static.serve',
        {'document_root': CONFERENCE_STUFF_DIR, 'show_indexes': True}
    ))
    from settings import MICROBLOG_STUFF_URL, MICROBLOG_STUFF_DIR
    args.append((
        r'^%s(?P<path>.*)$' % MICROBLOG_STUFF_URL,
        'django.views.static.serve',
        {'document_root': MICROBLOG_STUFF_DIR, 'show_indexes': True}
    ))
    urlpatterns += patterns('', *args)
<commit_msg>i file statici del microblog si servono via STATIC_DIRS<commit_after>from django.conf.urls.defaults import *
from django.conf import settings

from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    (r'^admin/', include(admin.site.urls)),
    (r'^accounts/login/', 'django.contrib.auth.views.login'),
    url(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}, name='auth_logout'),
    (r'^assopy/$', 'conference.views.genro_wrapper'),
    (r'^p3/gmap.js$', 'p3.views.gmap'),
    (r'^i18n/', include('django.conf.urls.i18n')),
    (r'^blog/', include('microblog.urls')),
    (r'^conference/', include('conference.urls')),
    (r'^comments/', include('django.contrib.comments.urls')),
    (r'^hcomments/', include('hcomments.urls')),
)

if 'rosetta' in settings.INSTALLED_APPS:
    urlpatterns += patterns('',
        url(r'^rosetta/', include('rosetta.urls')),
    )

if settings.DEBUG:
    import os.path
    args = []
    for k, path in settings.STATIC_DIRS.items():
        args.append((
            r'^static/%s/(?P<path>.*)$' % k,
            'django.views.static.serve',
            {'document_root': os.path.join(path, k), 'show_indexes': True}
        ))
    from conference.settings import CONFERENCE_STUFF_URL, CONFERENCE_STUFF_DIR
    args.append((
        r'^%s(?P<path>.*)$' % CONFERENCE_STUFF_URL[1:],
        'django.views.static.serve',
        {'document_root': CONFERENCE_STUFF_DIR, 'show_indexes': True}
    ))
    urlpatterns += patterns('', *args)

{'fraction_non_alphanumeric': 0.19166666666666668, 'fraction_numerical': 0.004320987654320987, 'mean_word_length': 3.5971631205673757, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, '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': '7667685', 'n_tokens_mistral': 1198, 'n_tokens_neox': 1163, 'n_words': 179}