You do not need to edit your model to calculate columns for the administrator on the fly, creating a function in the ModelAdmin object that accepts the second parameter, this will be a regular instance of the polling model. By writing code the same way as in the model, you can ignore yourself here, since it does not have what you want.
class PollAdmin(admin.ModelAdmin)
list_display = (<other_fields>, 'choice_count')
def choice_count(self, model_instance):
return model_instance.choice_set.count()
source
share