from django import forms from django.contrib.auth.models import User from django.contrib.auth import authenticate from django.db.models.query import QuerySet from django.core.exceptions import ValidationError from ..status_code import * class LoginForm(forms.Form): username = forms.CharField(required=True, error_messages={ 'required': USERNAME_MISSING, }) password = forms.CharField(required=True, error_messages = { 'required': PASSWORD_MISSING, })