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


admin.autodiscover()


urlpatterns = patterns(
    '',
    # Webserver urls
    url(r'^', include('webserver.home.urls')),
    url(r'^', include('webserver.profiles.urls')),
    url(r'^', include('webserver.codemanagement.urls')),

    # Competition
    url(r'^', include('competition.urls')),

    # Django AllAuth
    url(r'^accounts/', include('allauth.urls')),

    # Zinnia Blog
    url(r'^weblog/', include('zinnia.urls')),
    url(r'^comments/', include('django.contrib.comments.urls')),

    # Django Admin
    url(r'^admin/', include(admin.site.urls)),
    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
    url(r'^admin_tools/', include('admin_tools.urls')),
)

# Flat pages
urlpatterns += patterns(
    'django.contrib.flatpages.views',
    url(r'^(?P<url>.*)$', 'flatpage'),
)

if settings.DEBUG:
    urlpatterns += patterns(
        '',
        url(r'^media/(?P<path>.*)$', 'django.views.static.serve',
            {'document_root': settings.MEDIA_ROOT}),
        url(r'^static/(?P<path>.*)$', 'django.views.static.serve',
            {'document_root': settings.STATIC_ROOT}),
    )<commit_msg>Fix that makes the media uploads work correctly.<commit_after>from django.conf.urls.defaults import patterns, url, include
from django.conf import settings
from django.contrib import admin


admin.autodiscover()


urlpatterns = patterns(
    '',
    # Webserver urls
    url(r'^', include('webserver.home.urls')),
    url(r'^', include('webserver.profiles.urls')),
    url(r'^', include('webserver.codemanagement.urls')),

    # Competition
    url(r'^', include('competition.urls')),

    # Django AllAuth
    url(r'^accounts/', include('allauth.urls')),

    # Zinnia Blog
    url(r'^weblog/', include('zinnia.urls')),
    url(r'^comments/', include('django.contrib.comments.urls')),

    # Django Admin
    url(r'^admin/', include(admin.site.urls)),
    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
    url(r'^admin_tools/', include('admin_tools.urls')),
)

if settings.DEBUG:
    urlpatterns += patterns(
        '',
        url(r'^media/(?P<path>.*)$', 'django.views.static.serve',
            {'document_root': settings.MEDIA_ROOT,'show_indexes':True}),
        url(r'^static/(?P<path>.*)$', 'django.views.static.serve',
            {'document_root': settings.STATIC_ROOT}),
    )

# Flat pages
urlpatterns += patterns(
    'django.contrib.flatpages.views',
    url(r'^(?P<url>.*)$', 'flatpage'),
)

{'fraction_non_alphanumeric': 0.19498069498069498, 'fraction_numerical': 0.0, 'mean_word_length': 3.815985130111524, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '1631606', 'n_tokens_mistral': 901, 'n_tokens_neox': 875, 'n_words': 137}