<commit_before>from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.contrib.auth.views import (
    login as login_view,
    logout as logout_view
)
from django.conf.urls.static import static
from django.conf import settings
from django.views.generic import TemplateView

def templ(regex, template):
    return (regex, TemplateView.as_view(template_name= template + ".dj.htm"))

admin.autodiscover()

urlpatterns = patterns("",
    (settings.ADMIN_REGEX, include(admin.site.urls)),
    url(settings.LOGIN_REGEX, login_view, {
        "template_name": "registration/login.dj.htm",
    }),
    url(settings.LOGOUT_REGEX, logout_view, {
        "next_page": settings.LOGOUT_REDIRECT_URL,
    }),
    # Include all of the blog app urls.
    (r"^blog/", include("blog.urls")),
    # Include all of the hording urls.
    (r"^hording/", include("hording.urls")),
)

urlpatterns += patterns("",
    templ(r"^$", "index"),
)

if settings.DEBUG:
    # Serve media files via Django in DEBUG mode.
    urlpatterns += static(settings.MEDIA_URL,
        document_root=settings.MEDIA_ROOT)

    # Serve static files via Django in DEBUG mode.
    urlpatterns += static(settings.STATIC_URL,
        document_root=settings.STATIC_ROOT)
<commit_msg>302 redirect the index to the blog until I make something better.<commit_after>from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.contrib.auth.views import (
    login as login_view,
    logout as logout_view
)
from django.conf.urls.static import static
from django.conf import settings
from django.views.generic import TemplateView
from django.views.generic import RedirectView

def templ(regex, template):
    return (regex, TemplateView.as_view(template_name= template + ".dj.htm"))

admin.autodiscover()

urlpatterns = patterns("",
    (settings.ADMIN_REGEX, include(admin.site.urls)),
    url(settings.LOGIN_REGEX, login_view, {
        "template_name": "registration/login.dj.htm",
    }),
    url(settings.LOGOUT_REGEX, logout_view, {
        "next_page": settings.LOGOUT_REDIRECT_URL,
    }),
    # Include all of the blog app urls.
    (r"^blog/", include("blog.urls")),
    # Include all of the hording urls.
    (r"^hording/", include("hording.urls")),
)

urlpatterns += patterns("",
    # TODO: Implement a more meaningful homepage.
    # templ(r"^$", "index"),
    (r"^$", RedirectView.as_view(
        url= "/blog/",
        permanent= False,
    )),
)

if settings.DEBUG:
    # Serve media files via Django in DEBUG mode.
    urlpatterns += static(settings.MEDIA_URL,
        document_root=settings.MEDIA_ROOT)

    # Serve static files via Django in DEBUG mode.
    urlpatterns += static(settings.STATIC_URL,
        document_root=settings.STATIC_ROOT)

{'fraction_non_alphanumeric': 0.11903908210828254, 'fraction_numerical': 0.0010756543564001434, 'mean_word_length': 3.7938144329896906, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, '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': '1702963', 'n_tokens_mistral': 896, 'n_tokens_neox': 882, 'n_words': 221}