neighbourhood/models.py
def search_by_username(cls, search_term):
        """Method for getting a user by username through search functionality"""

        users = cls.objects.filter(user__username__icontains = search_term)
        return users
Method for getting a user by username through search functionality
Method for getting a user by username through search functionality
Method for getting a user by username through search functionality
def search_by_username(cls, search_term):
        users = cls.objects.filter(user__username__icontains = search_term)
        return users
def search_by_username ( cls , search_term ) : users = cls . objects . filter ( user__username__icontains = search_term ) return users
Method for getting a user by username through search functionality
Method for getting a user by username through search functionality
"""Method for getting a user by username through search functionality"""
cls
search_term