<commit_before>"""
Handlers for fetching upload templates.
"""

from django.shortcuts import render


CONTENT_TYPE__CSV = 'text/csv'

TEMPLATE__SAMPLES_BATCH_IMPORT_FROM_SERVER = 'sample_list_targets_template.csv'

TEMPLATE__SAMPLES_BATCH_BROWSER_UPLOAD = (
        'sample_list_browser_upload_template.tsv')


def sample_list_targets_template(request):
    """Let the user download a blank sample targets template as a
    comma-separated values file (.csv) so they can fill it in and upload
    it back to the server.<commit_msg>Fix test broken by last commit.<commit_after>"""
Handlers for fetching upload templates.
"""

from django.shortcuts import render


CONTENT_TYPE__CSV = 'text/csv'

TEMPLATE__SAMPLES_BATCH_IMPORT_FROM_SERVER = 'sample_list_targets_template.csv'

TEMPLATE__SAMPLES_BATCH_BROWSER_UPLOAD = (
        'sample_list_browser_upload_template.csv')


def sample_list_targets_template(request):
    """Let the user download a blank sample targets template as a
    comma-separated values file (.csv) so they can fill it in and upload
    it back to the server.
{'fraction_non_alphanumeric': 0.06759259259259259, 'fraction_numerical': 0.0, 'mean_word_length': 5.107344632768362, 'pattern_counts': {'":': 0, '<': 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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1450905', 'n_tokens_mistral': 346, 'n_tokens_neox': 339, 'n_words': 96}