Skip to content

Commit 4142afd

Browse files
authored
Merge pull request #13 from kunalgrover05/patch-1
Add documentation for using in custom filters
2 parents 9a9bb97 + 3ec26fd commit 4142afd

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,19 @@ class EntityAdmin(admin.ModelAdmin):
4242
)
4343
```
4444

45+
Example of a custom filter that uses the provided template:
46+
47+
```py
48+
class CustomFilter(SimpleListFilter):
49+
template = 'django_admin_listfilter_dropdown/dropdown_filter.html'
50+
51+
def lookups(self, request, model_admin):
52+
...
53+
54+
def queryset(self, request, queryset):
55+
...
56+
```
57+
4558
# Example
4659

4760
Here's what it looks like:

0 commit comments

Comments
 (0)