What's your value of 'fromdate' and 'todate'?
On Sat, 10 Sept 2022 at 13:27, tech george wrote:
> Hello Carlos,
>
> I have used the code below as you advised by when I filter the table comes
> blank:
>
> query_results = Prescription.objects.filter(date__range=[fromdate,todate])
>
> Regards,
>
>
Hello Carlos,
I have used the code below as you advised by when I filter the table comes
blank:
query_results = Prescription.objects.filter(date__range=[fromdate,todate])
Regards,
On Fri, Sep 9, 2022 at 6:11 PM carlos wrote:
> Hello why use raw?
> query_results = Prescription.objects.filter(
Hello why use raw?
query_results = Prescription.objects.filter(date__range=[fromdate,todate])
if you have any problem with performance hit database use select_related or
used m2m field use prefect_related
https://docs.djangoproject.com/en/4.1/ref/models/querysets/
best!
On Fri, Sep 9, 2022 at 7:4
Hello friends!
I am trying to give users an easier way to filter data by date range.
My views.py code is as below, but unfortunately, it is hiding data without
applying the filter whenever I try to use if, else statements.
Please advise what I might be doing wrong.
views.py
ef referralsReports
The error looked like this. But for what I was wanting I had to leave this
class method and go to the def method...
That way I can do a lot more customization, like putting the update view in
a popup.
But I managed to solve it, thank you very much Boris!
Em qui., 8 de set. de 2022 às 20:23, Boris
5 matches
Mail list logo