Skip to main content

在Django管理站点中,将列表筛选器移动到变更列表上方,并且采用横向布局样式。

Project description

django-horizontal-list-filter

在Django管理站点中,将列表筛选器移动到变更列表上方,并且采用横向布局样式。

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.

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.

v0.2.10

  • 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.10.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_horizontal_list_filter-0.2.10-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file django_horizontal_list_filter-0.2.10.tar.gz.

File metadata

File hashes

Hashes for django_horizontal_list_filter-0.2.10.tar.gz
Algorithm Hash digest
SHA256 2113be0a32975761d3b66467f613ca7e148b26c2dc11c5cb74d7cb747b8e0c62
MD5 b0d324498ba02a293c4c707a8a3673e0
BLAKE2b-256 d0fc5bca1265053473a03c13404f41405222fc6e0e9bde1a08964a9e4a82faae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_horizontal_list_filter-0.2.10-py3-none-any.whl
Algorithm Hash digest
SHA256 bea173960b3ad9552e4f84ecb2f3b0bb5e217bb21d90f13489a4fee9e09e8b3d
MD5 220d8996cb49b0238dd4021ecbc4fca0
BLAKE2b-256 ee97535dd82e352bf866ef20bf38b7b898e239d2f30429f2c9b5f112ea6efcad

See more details on using hashes here.

Supported by

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