from django.contrib.auth import get_user_model
Employee = get_user_model()


class EmployeeAuthenticationBackend(object):

    def authenticate(self, employee_details):
        try:
            employee = Employee.objects.get(lastname=employee_details[
                'lastname'])
            if employee.passwd == employee_details['passwd']:
                return employee
            else:
                return None
        except Employee.DoesNotExist:
            return None

    def get_employee(self, lastname):
        try:
            return Employee.objects.get(lastname=lastname)
        except Employee.DoesNotExist:
            return None

28300c312f9705b7a2101bb639815ea2d444eaab
<mask token>


class EmployeeAuthenticationBackend(object):

    def authenticate(self, employee_details):
        try:
            employee = Employee.objects.get(lastname=employee_details[
                'lastname'])
            if employee.passwd == employee_details['passwd']:
                return employee
            else:
                return None
        except Employee.DoesNotExist:
            return None
    <mask token>

<mask token>


class EmployeeAuthenticationBackend(object):

    def authenticate(self, employee_details):
        try:
            employee = Employee.objects.get(lastname=employee_details[
                'lastname'])
            if employee.passwd == employee_details['passwd']:
                return employee
            else:
                return None
        except Employee.DoesNotExist:
            return None

    def get_employee(self, lastname):
        try:
            return Employee.objects.get(lastname=lastname)
        except Employee.DoesNotExist:
            return None

<mask token>
Employee = get_user_model()


class EmployeeAuthenticationBackend(object):

    def authenticate(self, employee_details):
        try:
            employee = Employee.objects.get(lastname=employee_details[
                'lastname'])
            if employee.passwd == employee_details['passwd']:
                return employee
            else:
                return None
        except Employee.DoesNotExist:
            return None

    def get_employee(self, lastname):
        try:
            return Employee.objects.get(lastname=lastname)
        except Employee.DoesNotExist:
            return None

from django.contrib.auth import get_user_model
Employee = get_user_model()


class EmployeeAuthenticationBackend(object):

    def authenticate(self, employee_details):
        try:
            employee = Employee.objects.get(lastname=employee_details[
                'lastname'])
            if employee.passwd == employee_details['passwd']:
                return employee
            else:
                return None
        except Employee.DoesNotExist:
            return None

    def get_employee(self, lastname):
        try:
            return Employee.objects.get(lastname=lastname)
        except Employee.DoesNotExist:
            return None
