Reputation: 435
I'm getting the NameError: name 'QuerySet' is not defined error in below line.
QuerySet(query=MappingTraineeQ.objects.filter(date__range=(startdate,enddate)).query, model=MappingTraineeQ)
I'm not getting the problem, do I need to import anything for this? or I missed something.
please help me with the above.
Thanks
Upvotes: 5
Views: 5110
Reputation: 9235
You could import Queryset
like,
from django.db.models.query import QuerySet
Upvotes: 5