This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db.models import Q | |
from django.http import HttpResponse | |
from app.models import Employee | |
def index(request): | |
queryset = Employee.objects.filter( | |
Q(id__icontains="Steven") | |
| Q(fullName1__icontains="Steven") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
class Employee(models.Model): | |
id = models.CharField(max_length=255, primary_key=True) | |
fullName1 = models.CharField(max_length=255) | |
workEmail = models.CharField(max_length=255) | |
class Meta: | |
db_table = 'employees' |