<commit_before>import urlparse
from django.conf.urls import patterns, include, url
from django.conf import settings
from django.views.static import serve as static_serve

def static_urls():
    '''Returns nothing if we're not in DEBUG, and allows for static
    file serving from this server if the STATIC_URL points to a
    relative location in this server.
    '''
    if not settings.DEBUG:
        return ()
    parsed_url = urlparse.urlparse(settings.STATIC_URL)
    if parsed_url.netloc:
        log.warn('Cannot serve STATIC files since settings.STATIC_URL points outside this server.')
        return ()
    return patterns('',
                    url(r'^' + settings.STATIC_URL.strip('/') + r'/(?P<path>.*)$',<commit_msg>serve static files in production too<commit_after>import urlparse
from django.conf.urls import patterns, include, url
from django.conf import settings
from django.views.static import serve as static_serve

def static_urls():
    '''Returns urls for for static file serving from this server. In case
    the STATIC_URL points to an absolute server, we don't serve static
    files from this server.
    '''
    parsed_url = urlparse.urlparse(settings.STATIC_URL)
    if parsed_url.netloc:
        log.debug('Cannot serve STATIC files since settings.STATIC_URL points outside this server.')
        return patterns('')
    return patterns('',
                    url(r'^' + settings.STATIC_URL.strip('/') + r'/(?P<path>.*)$',
{'fraction_non_alphanumeric': 0.0969738651994498, 'fraction_numerical': 0.0, 'mean_word_length': 3.395770392749245, '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': '5730563', 'n_tokens_mistral': 402, 'n_tokens_neox': 393, 'n_words': 143}