Created
July 31, 2019 02:23
-
-
Save ademidun/ef9f15a8830fde18889c34ad4f374d0a to your computer and use it in GitHub Desktop.
Useful commands for Django
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
# use this if you want to delete a specific number of entries | |
# https://stackoverflow.com/questions/13248593/django-database-delete-specific-number-of-entries | |
HomeImage.objects.filter(pk__in=HomeImage.objects.filter(ImageVectors={}).values_list('pk')[:5000])#.delete() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment