<commit_before>from django.conf.urls import url
from django.views.generic import TemplateView
from django.conf.urls.static import static
from django.conf import settings

from . import views

urlpatterns = [
    url(r'^$', views.home, name='home'),
    url(r'^search/$', views.search, name='search'),

    url(r'^about/$', TemplateView.as_view(template_name='static/about.html'), name='about'),
    url(r'^faq/$', TemplateView.as_view(template_name='static/faq.html'), name='faq'),


    url(r'^robots.txt$', TemplateView.as_view(template_name='robots.txt')),
    url(r'^sitemap.xml$', TemplateView.as_view(template_name='sitemap.xml')),


    url(r'^contests/$', views.ContestList.as_view(), name='contest-list'),
    url(r'^contests/(?P<slug>[a-zA-Z0-9-]+)/$', views.ContestDetail.as_view(), name='contest-detail'),

    url(r'^conventions/$', views.ConventionList.as_view(), name='convention-list'),
    url(r'^conventions/(?P<slug>[a-zA-Z0-9-]+)/$', views.ConventionDetail.as_view(), name='convention-detail'),

    url(r'^districts/$', views.DistrictList.as_view(), name='district-list'),
    url(r'^districts/(?P<slug>[a-zA-Z0-9-]+)/$', views.DistrictDetail.as_view(), name='district-detail'),

    url(r'^singers/$', views.SingerList.as_view(), name='singer-list'),
    url(r'^singers/(?P<slug>[a-zA-Z0-9-]+)/$', views.SingerDetail.as_view(), name='singer-detail'),

    url(r'^choruses/$', views.ChorusList.as_view(), name='chorus-list'),
    url(r'^choruses/(?P<slug>[a-zA-Z0-9-]+)/$', views.chorus_detail, name='chorus-detail'),

    url(r'^quartets/$', views.QuartetList.as_view(), name='quartet-list'),
    url(r'^quartets/(?P<slug>[a-zA-Z0-9-]+)/$', views.quartet_detail, name='quartet-detail'),
]

urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)<commit_msg>Turn off local media server for production<commit_after>from django.conf.urls import url
from django.views.generic import TemplateView
from django.conf.urls.static import static
from django.conf import settings

from . import views

urlpatterns = [
    url(r'^$', views.home, name='home'),
    url(r'^search/$', views.search, name='search'),

    url(r'^about/$', TemplateView.as_view(template_name='static/about.html'), name='about'),
    url(r'^faq/$', TemplateView.as_view(template_name='static/faq.html'), name='faq'),


    url(r'^robots.txt$', TemplateView.as_view(template_name='robots.txt')),
    url(r'^sitemap.xml$', TemplateView.as_view(template_name='sitemap.xml')),


    url(r'^contests/$', views.ContestList.as_view(), name='contest-list'),
    url(r'^contests/(?P<slug>[a-zA-Z0-9-]+)/$', views.ContestDetail.as_view(), name='contest-detail'),

    url(r'^conventions/$', views.ConventionList.as_view(), name='convention-list'),
    url(r'^conventions/(?P<slug>[a-zA-Z0-9-]+)/$', views.ConventionDetail.as_view(), name='convention-detail'),

    url(r'^districts/$', views.DistrictList.as_view(), name='district-list'),
    url(r'^districts/(?P<slug>[a-zA-Z0-9-]+)/$', views.DistrictDetail.as_view(), name='district-detail'),

    url(r'^singers/$', views.SingerList.as_view(), name='singer-list'),
    url(r'^singers/(?P<slug>[a-zA-Z0-9-]+)/$', views.SingerDetail.as_view(), name='singer-detail'),

    url(r'^choruses/$', views.ChorusList.as_view(), name='chorus-list'),
    url(r'^choruses/(?P<slug>[a-zA-Z0-9-]+)/$', views.chorus_detail, name='chorus-detail'),

    url(r'^quartets/$', views.QuartetList.as_view(), name='quartet-list'),
    url(r'^quartets/(?P<slug>[a-zA-Z0-9-]+)/$', views.quartet_detail, name='quartet-detail'),
]

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
{'fraction_non_alphanumeric': 0.2261774370208105, 'fraction_numerical': 0.0065717415115005475, 'mean_word_length': 5.641818181818182, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '1436197', 'n_tokens_mistral': 1432, 'n_tokens_neox': 1346, 'n_words': 157}