Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

django run queryset in terminal

# In the shell type (must have pip installed django-extensions first)
C:/> python manage.py shell_plus
>>>modelName.objects.filter(date__year__gte=2020)
## This will return all the objects where the year in the date field >= 2020
 
PREVIOUS NEXT
Tagged: #django #run #queryset #terminal
ADD COMMENT
Topic
Name
1+3 =