Query multiple dates using filters gte and lte to export data into pdf file

23 views
Skip to first unread message

Monde

unread,
Apr 8, 2019, 8:47:21 AM4/8/19
to Django users
Hi, everyone this is my first time posting in this group.

I've hit a deadend in my use case for almost a week now to export a pdf file based on a query for from date(gte) and to date(lte). Below is my code for exporting a pdf file based on the logged in user. I've attached my pdf.html

class PdfCarrier(View):

def get(self, request):
user = self.request.user
carriers = Carrier.objects.filter(agent__name=user)
today = timezone.now()
params = {
'today': today,
'carriers': carriers,
'request': request
}
return Render.render('carrier/carrier_print.html', params)

How can I do it when searching multiple queries especially based on dates(gte and lte) from an another html which will have the search html attribute(s).

carrier_print.html
Reply all
Reply to author
Forward
0 new messages