<commit_before>from django.conf import settings
from django.core.exceptions import SuspiciousOperation
from django.shortcuts import render

def debug(request):
    if not settings.DEBUG:
        raise SuspiciousOperation("This view isn't available in production mode! Please set DEBUG to True")
    auth_headers = {}
    auth_headers['username'] = request.META.get('HTTP_AUTH_USER', None)
    auth_headers['firstname'] = request.META.get('HTTP_AUTH_FIRSTNAME', None)
    auth_headers['lastname'] = request.META.get('HTTP_AUTH_LASTNAME', None)
    auth_headers['mail'] = request.META.get('HTTP_AUTH_MAIL', None)
    auth_headers['groups'] = request.META.get('HTTP_AUTH_GROUPS', '').split('; ')
    auth_headers['is_superuser'] = request.META.get('HTTP_AUTH_SUPERUSER', None) == 'true'
    auth_headers['is_staff'] = request.META.get('HTTP_AUTH_STAFF', None) == 'true'
    return render(request, 'lemonldap/debug.html', {'auth_headers': auth_headers})<commit_msg>Le paramètre groups ne sera pas utilisé<commit_after>from django.conf import settings
from django.core.exceptions import SuspiciousOperation
from django.shortcuts import render

def debug(request):
    if not settings.DEBUG:
        raise SuspiciousOperation("This view isn't available in production mode! Please set DEBUG to True")
    auth_headers = {}
    auth_headers['username'] = request.META.get('HTTP_AUTH_USER', None)
    auth_headers['firstname'] = request.META.get('HTTP_AUTH_FIRSTNAME', None)
    auth_headers['lastname'] = request.META.get('HTTP_AUTH_LASTNAME', None)
    auth_headers['mail'] = request.META.get('HTTP_AUTH_MAIL', None)
    auth_headers['is_superuser'] = request.META.get('HTTP_AUTH_SUPERUSER', None) == 'true'
    auth_headers['is_staff'] = request.META.get('HTTP_AUTH_STAFF', None) == 'true'
    return render(request, 'lemonldap/debug.html', {'auth_headers': auth_headers})
{'fraction_non_alphanumeric': 0.13290460878885316, 'fraction_numerical': 0.0, 'mean_word_length': 5.740072202166065, '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': '2439714', 'n_tokens_mistral': 587, 'n_tokens_neox': 582, 'n_words': 120}