<commit_before>"""
LDAP Authentication
"""

from django import forms
from django.conf import settings
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect

from django_auth_ldap.backend import LDAPBackend

# some parameters to indicate that status updating is possible
STATUS_UPDATES = False


class LoginForm(forms.Form):
	username = forms.CharField(max_length=50)
	password = forms.CharField(widget=forms.PasswordInput(), max_length=100)


def ldap_login_view(request):
	from helios_auth.view_utils import render_template
	from helios_auth.views import after
	
	error = None

	if request.method == "GET":
		form = LoginForm()<commit_msg>Add missing import<commit_after>"""
LDAP Authentication
"""

from django import forms
from django.conf import settings
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from django.utils.translation import ugettext as _

from django_auth_ldap.backend import LDAPBackend

# some parameters to indicate that status updating is possible
STATUS_UPDATES = False


class LoginForm(forms.Form):
	username = forms.CharField(max_length=50)
	password = forms.CharField(widget=forms.PasswordInput(), max_length=100)


def ldap_login_view(request):
	from helios_auth.view_utils import render_template
	from helios_auth.views import after
	
	error = None

	if request.method == "GET":
		form = LoginForm()
{'fraction_non_alphanumeric': 0.07244318181818182, 'fraction_numerical': 0.007102272727272727, 'mean_word_length': 6.009950248756219, 'pattern_counts': {'":': 2, '<': 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': '5033974', 'n_tokens_mistral': 422, 'n_tokens_neox': 405, 'n_words': 122}