<commit_before>from django.conf.urls import url, patterns

from projects.constants import LANGUAGES_REGEX
from urls import urlpatterns as main_patterns

handler500 = 'core.views.server_error'
handler404 = 'core.views.server_error_404'

urlpatterns = patterns(
    '',  # base view, flake8 complains if it is on the previous line.
    url((r'^projects/(?P<project_slug>[\w.-]+)/(?P<lang_slug>%s)/'
         r'(?P<version_slug>[\w.-]+)/(?P<filename>.*)$' % LANGUAGES_REGEX),
        'core.views.subproject_serve_docs',
        name='subproject_docs_detail'),

    url(r'^projects/(?P<project_slug>[\w.-]+)',
        'core.views.subproject_serve_docs',
        name='subproject_docs_detail'),

    url(r'^projects/$',
        'core.views.subproject_list',
        name='subproject_docs_list'),

    url(r'^(?P<lang_slug>%s)/(?P<version_slug>[\w.-]+)/(?P<filename>.*)$' % LANGUAGES_REGEX,
        'core.views.serve_docs',
        name='docs_detail'),

    url(r'^(?P<lang_slug>%s)/(?P<version_slug>.*)/$' % LANGUAGES_REGEX,
        'core.views.serve_docs',
        {'filename': 'index.html'},
        name='docs_detail'),

    url(r'^page/(?P<filename>.*)$',
        'core.views.redirect_page_with_filename',
        name='docs_detail'),

    url(r'^(?P<lang_slug>%s)/$' % LANGUAGES_REGEX,
        'core.views.redirect_lang_slug',
        name='lang_subdomain_handler'),

    url(r'^(?P<version_slug>.*)/$',
        'core.views.redirect_version_slug',
        name='version_subdomain_handler'),

    url(r'^$', 'core.views.redirect_project_slug'),
)

urlpatterns += main_patterns<commit_msg>Add urlconf name for homepage in subdomain urls<commit_after>from django.conf.urls import url, patterns

from projects.constants import LANGUAGES_REGEX
from urls import urlpatterns as main_patterns

handler500 = 'core.views.server_error'
handler404 = 'core.views.server_error_404'

urlpatterns = patterns(
    '',  # base view, flake8 complains if it is on the previous line.
    url((r'^projects/(?P<project_slug>[\w.-]+)/(?P<lang_slug>%s)/'
         r'(?P<version_slug>[\w.-]+)/(?P<filename>.*)$' % LANGUAGES_REGEX),
        'core.views.subproject_serve_docs',
        name='subproject_docs_detail'),

    url(r'^projects/(?P<project_slug>[\w.-]+)',
        'core.views.subproject_serve_docs',
        name='subproject_docs_detail'),

    url(r'^projects/$',
        'core.views.subproject_list',
        name='subproject_docs_list'),

    url(r'^(?P<lang_slug>%s)/(?P<version_slug>[\w.-]+)/(?P<filename>.*)$' % LANGUAGES_REGEX,
        'core.views.serve_docs',
        name='docs_detail'),

    url(r'^(?P<lang_slug>%s)/(?P<version_slug>.*)/$' % LANGUAGES_REGEX,
        'core.views.serve_docs',
        {'filename': 'index.html'},
        name='docs_detail'),

    url(r'^page/(?P<filename>.*)$',
        'core.views.redirect_page_with_filename',
        name='docs_detail'),

    url(r'^(?P<lang_slug>%s)/$' % LANGUAGES_REGEX,
        'core.views.redirect_lang_slug',
        name='lang_subdomain_handler'),

    url(r'^(?P<version_slug>.*)/$',
        'core.views.redirect_version_slug',
        name='version_subdomain_handler'),

    url(r'^$', 'core.views.redirect_project_slug', name='homepage'),
)

urlpatterns += main_patterns
{'fraction_non_alphanumeric': 0.18728682170542635, 'fraction_numerical': 0.006201550387596899, 'mean_word_length': 3.7934621099554233, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, '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': '1667715', 'n_tokens_mistral': 1199, 'n_tokens_neox': 1175, 'n_words': 141}