Skip to main content

Move list filter to above of the changelist in django admin site.

Project description

django-horizontal-list-filter

Move list filter to above of the changelist in django admin site.

Install

pip install django-horizontal-list-filter

Usage

pro/settings.py

INSTALLED_APPS = [
    ...
    'django_simple_tags',
    'django_middleware_global_request',
    'django_horizontal_list_filter',
    'mptt', # optional
    ...
]

MIDDLEWARE = [
    ...
    'django_middleware_global_request.middleware.GlobalRequestMiddleware',
    ...
]

DJANGO_HORIZONTAL_LIST_FILTER_USE_SELECT2 = True
  • If using mptt, make sure that django_horizontal_list_filter is above mptt, because django_horizontal_list_filter is override mptt's template.
  • If using some other third part app provides customized list filter, you may need to rewrite the filter's template to turn the result html from ul to select.

Preview

django-horizontal-list-filter-preview

Releases

v0.1.0

  • First release.

v0.1.1

  • Fix cl context variable not provided problem.

v0.1.2

  • Remove django_static_jquery3 depends. Inject our css&js into ModelAdmin.media in apps.ready step.
  • Add app_requires.
  • Add License file.

v0.2.0

  • Use DJANGO_HORIZONTAL_LIST_FILTER_USE_SELECT2=True in pro/settings.py to turn all simple-select-box to select2-style-select-box.

v0.2.2

  • Add field name as select box's class name.
  • Fix the problem that the select boxes' width fixed to 150px problem.

v0.2.4

  • Fix filter label style if using tag h3.
  • Add is_using_django_horizontal_list_filter flag into request.

v0.2.6

  • Fix filter block style that using ul tag.

v0.2.7

  • Add max-width css style to select box.

v0.2.9

  • Doc update.

Project details


Download files

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

Source Distribution

django-horizontal-list-filter-0.2.9.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file django-horizontal-list-filter-0.2.9.tar.gz.

File metadata

File hashes

Hashes for django-horizontal-list-filter-0.2.9.tar.gz
Algorithm Hash digest
SHA256 52589952ebc15e23a41ff352b328ae02a56a3da94397ae524ef5a95596811860
MD5 fd46968c36b7814df73c6c74e5d5331f
BLAKE2b-256 df2759f93e7258aff81222a75141a03348e62e3da8e49b84a599eec968196d49

See more details on using hashes here.

File details

Details for the file django_horizontal_list_filter-0.2.9-py3-none-any.whl.

File metadata

File hashes

Hashes for django_horizontal_list_filter-0.2.9-py3-none-any.whl
Algorithm Hash digest
SHA256 2bfe5b9c6d951f49962e4cb28937becda0aa424bb17598cfc08e5661830b479d
MD5 695f11cb361b2f284caf082754c65e58
BLAKE2b-256 0cb4337cdf76656b4dac17f652c855815b0509d14cf07db37425f6fc7bf91681

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page