use `Feature.objects.filter(name=self.name).count()` here... len(query) will unnecessarily grab and evaluate all the objects in that query