All Projects → mrts → Django Admin List Filter Dropdown

mrts / Django Admin List Filter Dropdown

Licence: mit
Use dropdowns in Django admin list filter

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Django Admin List Filter Dropdown

Awesome Django
Repository mirror of GitLab: https://gitlab.com/rosarior/awesome-django This repository is not monitored for issues, use original at GitLab.
Stars: ✭ 8,527 (+3866.05%)
Mutual labels:  django, django-admin
Django Business Logic
Visual DSL framework for django
Stars: ✭ 134 (-37.67%)
Mutual labels:  django, django-admin
Django Admin Relation Links
An easy way to add links to relations in the Django Admin site.
Stars: ✭ 87 (-59.53%)
Mutual labels:  django, django-admin
Awesome Django Cn
Django 优秀资源大全。
Stars: ✭ 1,153 (+436.28%)
Mutual labels:  django, django-admin
Django Inline Actions
django-inline-actions adds actions to each row of the ModelAdmin or InlineModelAdmin.
Stars: ✭ 170 (-20.93%)
Mutual labels:  django, django-admin
Django Admin Material
A Django Admin interface based on Material Design by Google
Stars: ✭ 74 (-65.58%)
Mutual labels:  django, django-admin
Django Subadmin
A special kind of ModelAdmin that allows it to be nested within another ModelAdmin
Stars: ✭ 120 (-44.19%)
Mutual labels:  django, django-admin
Django Suit Daterange Filter
Filter for django-admin allowing lookups by date range
Stars: ✭ 13 (-93.95%)
Mutual labels:  django, django-admin
Django Admin Autocomplete Filter
A simple Django app to render list filters in django admin using autocomplete widget.
Stars: ✭ 166 (-22.79%)
Mutual labels:  django, django-admin
Django Material Admin
Material design for django administration
Stars: ✭ 163 (-24.19%)
Mutual labels:  django, django-admin
Django Polymorphic
Improved Django model inheritance with automatic downcasting
Stars: ✭ 1,135 (+427.91%)
Mutual labels:  django, django-admin
Django Suit
Modern theme for Django admin interface
Stars: ✭ 2,136 (+893.49%)
Mutual labels:  django, django-admin
Django Admin Numeric Filter
Numeric filters for Django admin
Stars: ✭ 46 (-78.6%)
Mutual labels:  django, django-admin
Django Admin Env Notice
Visually distinguish environments in Django Admin
Stars: ✭ 207 (-3.72%)
Mutual labels:  django, django-admin
E Commerce 2 django
Guest register, user register, user login, user logout, account home page, product view history, change password, reset password, change name, send activation email when register, resend activation email, add shipping address, add billing address, add nickname to the addresses, edit shipping address, edit billing address, view list of your addresses, reuse shipping addresses when order products, reuse billing addresses when ordeer products, show sales analytics if staff or admin only using -chart.js-, get analytics data with Ajax, receive marketing email, change if user will receive marketing email or not by admin, send contact message with Ajax, products list, product detail, download product detail as a PDF file, download digital product files -if the user purchased that digital product only-, orders list, list of digital products files, order detail, download order detail as a PDF file, verify order ownership with Ajax -to secure order detail page-, show cart products, add or remove product from cart, checkout page, thanks page when order placed successfully, add or reuse payment method, add or reuse payment method with Ajax, search products by title, search products by description, search products by price, search products by tag title, write tags for products -by admin only-, auto fill contact email, full name if user logged in.
Stars: ✭ 20 (-90.7%)
Mutual labels:  django, django-admin
Django Fluent Pages
A flexible, scalable CMS with custom node types, and flexible block content.
Stars: ✭ 103 (-52.09%)
Mutual labels:  django, django-admin
Django Oml
Object Moderation Layer
Stars: ✭ 12 (-94.42%)
Mutual labels:  django, django-admin
Requery
Store e run queries on database to help system manager of a Django website
Stars: ✭ 12 (-94.42%)
Mutual labels:  django, django-admin
Django Polymorphic Tree
Polymorphic MPTT tree support for models
Stars: ✭ 152 (-29.3%)
Mutual labels:  django, django-admin
Django Antd Tyadmin
类似 xadmin 的基于Model 快速生成前后台管理增删改查,筛选,搜索的后台管理自动化工具。Antd 界面好看现代化!前后端分离!无损二次开发!由Django Restful Framework 和 Ant Design Pro V4 驱动
Stars: ✭ 171 (-20.47%)
Mutual labels:  django, django-admin

django-admin-list-filter-dropdown

A Django admin filter implementation that renders as a dropdown.

If you have more than ten values for a field that you want to filter by in Django admin, the filtering sidebar gets long, cluttered and hard to use.

This app contains the DropdownFilter class that renders as a drop-down in the filtering sidebar to avoid this problem.

Usage

Install:

pip install django-admin-list-filter-dropdown

Enable in settings.py:

INSTALLED_APPS = (
    ...
    'django_admin_listfilter_dropdown',
    ...
)

Use in admin.py:

from django_admin_listfilter_dropdown.filters import DropdownFilter, RelatedDropdownFilter, ChoiceDropdownFilter

class EntityAdmin(admin.ModelAdmin):
    ...
    list_filter = (
        # for ordinary fields
        ('a_charfield', DropdownFilter),
        # for choice fields
        ('a_choicefield', ChoiceDropdownFilter),
        # for related fields
        ('a_foreignkey_field', RelatedDropdownFilter),
    )

Example of a custom filter that uses the provided template:

class CustomFilter(SimpleListFilter):
    template = 'django_admin_listfilter_dropdown/dropdown_filter.html'

    def lookups(self, request, model_admin):
        ...

    def queryset(self, request, queryset):
        ...

Example

Here's what it looks like:

Screenshot of dropdown admin filter

Credits

Based on this StackOverflow question and code from FeinCMS.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].