<commit_before>from django.conf import settings
from django.conf.urls import patterns, url, include
from django.contrib.auth.decorators import login_required


def get_document_root():
    """Returns the default Sphinx document root. Tries to trigger it from
    settings. 

    :returns:  Sphinx document root. Tries to trigger from settings. 
    :rtype: string
    """
    return settings.SPHINX_ROOT
    
urlpatterns = patterns('',
    (r'^$', login_required('django.views.static.serve'), {
            'path': 'index.html', 'document_root': get_document_root()}),
    (r'(?P<path>.*)$', login_required('django.views.static.serve'), {
        'document_root': get_document_root()}))<commit_msg>fixing login required and TypeError with string<commit_after>from django.conf import settings
from django.conf.urls import patterns, url, include
from django.contrib.auth.decorators import login_required
from django.views.static import serve as static_serve


def get_document_root():
    """Returns the default Sphinx document root. Tries to trigger it from
    settings. 

    :returns:  Sphinx document root. Tries to trigger from settings. 
    :rtype: string
    """
    return settings.SPHINX_ROOT
    
urlpatterns = patterns('',
    (r'^$', login_required(static_serve), {
            'path': 'index.html', 'document_root': get_document_root()}),
    (r'(?P<path>.*)$', login_required(static_serve), {
        'document_root': get_document_root()}))
{'fraction_non_alphanumeric': 0.12242090784044017, 'fraction_numerical': 0.0, 'mean_word_length': 4.105263157894737, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1648222', 'n_tokens_mistral': 432, 'n_tokens_neox': 421, 'n_words': 117}