Skip to content

Commit

Permalink
Merge pull request #10 from SamuelMS/master
Browse files Browse the repository at this point in the history
Make sure custom titles are used
  • Loading branch information
EricOuma authored Feb 15, 2024
2 parents bbd47f9 + 039dd13 commit 396b677
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions rangefilter/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,13 @@ def __init__(self, field, request, params, model, model_admin, field_path):
)
self.request = request
self.model_admin = model_admin
self.form = self.get_form(request)

custom_title = self._get_custom_title(request, model_admin, field_path)
if custom_title:
self.title = custom_title

self.form = self.get_form(request)

@staticmethod
def get_timezone(_request):
return timezone.get_default_timezone()
Expand Down Expand Up @@ -303,12 +304,13 @@ def __init__(self, field, request, params, model, model_admin, field_path):
)
self.request = request
self.model_admin = model_admin
self.form = self.get_form(request)

custom_title = self._get_custom_title(request, model_admin, field_path)
if custom_title:
self.title = custom_title

self.form = self.get_form(request)

def get_template(self):
return "rangefilter/numeric_filter.html"

Expand Down

0 comments on commit 396b677

Please sign in to comment.