<commit_before>"""View overrides for demo mode.
"""

from django.contrib.auth import authenticate
from django.contrib.auth import login
from django.http import HttpResponseRedirect


def login_demo_account(request):
    new_user = authenticate(username='gmcdev',
            password='<PASSWORD>')
    login(request, new_user)
    return HttpResponseRedirect("/")<commit_msg>Handle redirect_url in demo login bypass.<commit_after>"""View overrides for demo mode.
"""

from django.contrib.auth import authenticate
from django.contrib.auth import login
from django.http import HttpResponseRedirect


def login_demo_account(request):
    new_user = authenticate(username='gmcdev',
            password='<PASSWORD>')
    login(request, new_user)
    redirect_url = request.GET.get('next', '/')
    return HttpResponseRedirect(redirect_url)
{'fraction_non_alphanumeric': 0.10179640718562874, 'fraction_numerical': 0.0, 'mean_word_length': 5.014388489208633, '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': '1550295', 'n_tokens_mistral': 234, 'n_tokens_neox': 226, 'n_words': 58}