django 쿼리 세트에서 OR 조건을 수행하는 방법은 무엇입니까?

| |

다음 SQL 쿼리와 동일한 Django 쿼리를 작성하고 싶습니다.

SELECT * from user where income >= 5000 or income is NULL. 

Django 쿼리셋 필터는 어떻게 구성하나요?

User.objects.filter(income__gte=5000, income=0) 

이것은 필터를 AND하기 때문에 작동하지 않습니다. 개별 쿼리 세트를 통합하기 위해 필터를 OR하고 싶습니다.

Shop

Learn programming in R: courses

$

Best Python online courses for 2022

$

Best laptop for Fortnite

$

Best laptop for Excel

$

Best laptop for Solidworks

$

Best laptop for Roblox

$

Best computer for crypto mining

$

Best laptop for Sims 4

$

Latest questions

NUMPYNUMPY

psycopg2: insert multiple rows with one query

12 answers

NUMPYNUMPY

How to convert Nonetype to int or string?

12 answers

NUMPYNUMPY

How to specify multiple return types using type-hints

12 answers

NUMPYNUMPY

Javascript Error: IPython is not defined in JupyterLab

12 answers

News


Wiki

Python OpenCV | cv2.putText () method

numpy.arctan2 () in Python

Python | os.path.realpath () method

Python OpenCV | cv2.circle () method

Python OpenCV cv2.cvtColor () method

Python - Move item to the end of the list

time.perf_counter () function in Python

Check if one list is a subset of another in Python

Python os.path.join () method