Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

Queryset can be filtered by a given list on the django admin page, just like: qs.filter(field__in=[list])

Project description


Queryset can be filtered by a given list on the django admin page, just like: qs.filter(field__in=[list]).


[sudo] pip install django-valueinlist-filter

Add valueinlist_filter to settings.INSTALLED_APPS:


And then, set a CharField field in a model like this:

class Model(models.Model):
serial_number = models.CharField(max_length=32)

If you want to filter the **serial_number** field by a given value list(split string by space), you can bind ValueInListFilter to this field:

from valueinlist_filter.filter import ValueInListFilter
from django.contrib import admin
from models import Model

class ModelAdmin(admin.ModelAdmin):
list_filter = (
('serial_number', ValueInListFilter), # bind filter to CharField

Finally, you will get a textarea form on the filter side bar, the textarea's change event will trigger form.

Added a 'screenshot.png' picture.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-valueinlist-filter, version 0.1.3
Filename, size File type Python version Upload date Hashes
Filename, size django-valueinlist-filter-0.1.3.tar.gz (3.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page