<commit_before>import json
from django.http import HttpResponse
from taggit.models import Tag

def filter_tags(request):
	"Returns a JSON formatted list of tags starting with the value of GET variable 'q'."
	limiter = request.GET['q']
	results = Tag.objects.filter(name__startswith=limiter).values_list('name', flat=True)
	data = []
	for tag_name in results:
		data.append({'id': '"%s"' % tag_name, 'name': tag_name})
	return HttpResponse(json.dumps(data), mimetype="application/json")<commit_msg>Tag searches should be case-insensitive.<commit_after>import json
from django.http import HttpResponse
from taggit.models import Tag

def filter_tags(request):
	"Returns a JSON formatted list of tags starting with the value of GET variable 'q'."
	limiter = request.GET['q']
	results = Tag.objects.filter(name__istartswith=limiter).values_list('name', flat=True)
	data = []
	for tag_name in results:
		data.append({'id': '"%s"' % tag_name, 'name': tag_name})
	return HttpResponse(json.dumps(data), mimetype="application/json")
{'fraction_non_alphanumeric': 0.12720156555772993, 'fraction_numerical': 0.0, 'mean_word_length': 6.153846153846154, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3188608', 'n_tokens_mistral': 328, 'n_tokens_neox': 316, 'n_words': 93}