Skip to content

Instantly share code, notes, and snippets.

View lybcyd's full-sized avatar

Yibo Li lybcyd

View GitHub Profile
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")
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'