'Is it possible to get the selected date of DateRangeFilter in django admin.py?
I am trying to export the admin data into CSV file. For that i have to use start range and end range. So, i need to give the start date and end date manually the date is not fixed here. If i allow the user to select the date from DateRangefilter my job will be easy. After selecting the date i will allow them to export as CSV within two date ranges. Is it possible?
example:
Mymodel.objects.filter(created_at__range=(start_date, end_date))
Note: I have to do this functionality within the admin.py file. Not in frontend using javascript things.
Please help me.
Image link below
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
