As part of one of the requirement, we are overriding the Update method in the custom Queryset.
Sample code is as follows.
from django.db.models.query import QuerySet
def update(self, *args, **kwargs):
# Some Business Logic
# Call super to continue the flow -- from below line we are unable to invoke super
objects = PollQuerySet.as_manager()
question_text = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published')
TypeError at /polls/
must be type, not PollQuerySet
If I have understood your question correctly, you are unable to call the update method in the super class. if so that's because you are calling it wrong. Here is how:
In the case of python 3.x the class name and self become optional parameters. So the above line can be shortened to