Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Django を使用していますが、django.db.models の Q オブジェクトと count() を使用してクエリを使用するにはどうすればよいですか?
Given using a filter will result in a queryset object, you should just be able to use count() on the end of said containing filter. Like:
count = MyModel.objects.filter(Q(my_field__startswith='Hello')).count()