Skip to content

Commit

Permalink
Update date range filter package
Browse files Browse the repository at this point in the history
  • Loading branch information
Pancham1603 committed Dec 12, 2023
1 parent 28b9ec1 commit 7e21540
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions apps/users/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from django.http import HttpResponse
from django.utils import timezone
from django.utils.html import format_html
from daterangefilter.filters import PastDateRangeFilter
from rangefilter.filters import DateRangeFilter
from tablib import Dataset
from .models import *
from import_export.admin import ImportExportModelAdmin
Expand All @@ -18,7 +18,7 @@ class NightPassAdmin(admin.ModelAdmin):
list_display = ( 'name','user','hostel','date', 'campus_resource','hostel_check_out', 'check_in', 'check_out', 'hostel_check_in', 'defaulter')
search_fields = ('user__student__name','user__student__registration_number','user__student__email')
actions = ['export_as_xlsx']
list_filter = (('date', PastDateRangeFilter),'campus_resource','user__student__gender','user__student__hostel', 'defaulter', 'check_in', 'check_out')
list_filter = (('date', DateRangeFilter),'campus_resource','user__student__gender','user__student__hostel', 'defaulter', 'check_in', 'check_out')
autocomplete_fields = ('user', 'campus_resource')
readonly_fields = ('pass_id', 'check_in_time', 'check_out_time', 'hostel_checkout_time', 'hostel_checkin_time')

Expand Down
2 changes: 1 addition & 1 deletion core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
'django_crontab',
'hijack',
'hijack.contrib.admin',
"daterangefilter",
"rangefilter",
]


Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ django-import-export
django-crontab
uuid
tablib
django-daterangefilter
django-admin-rangefilter
XlsxWriter
pytz
django-sql-explorer[xls]

0 comments on commit 7e21540

Please sign in to comment.