All Projects → lukasvinclav → Django Admin Numeric Filter

lukasvinclav / Django Admin Numeric Filter

Licence: mit
Numeric filters for Django admin

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Django Admin Numeric Filter

Django Antd Tyadmin
类似 xadmin 的基于Model 快速生成前后台管理增删改查,筛选,搜索的后台管理自动化工具。Antd 界面好看现代化!前后端分离!无损二次开发!由Django Restful Framework 和 Ant Design Pro V4 驱动
Stars: ✭ 171 (+271.74%)
Mutual labels:  django, django-admin, admin
Django Material Admin
Material design for django administration
Stars: ✭ 163 (+254.35%)
Mutual labels:  django, django-admin, admin
Django Cruds Adminlte
django-cruds is simple drop-in django app that creates CRUD for faster prototyping
Stars: ✭ 373 (+710.87%)
Mutual labels:  django, django-admin, admin
Django Admin Bootstrap
Responsive Theme for Django Admin With Sidebar Menu
Stars: ✭ 787 (+1610.87%)
Mutual labels:  django, django-admin, admin
Django Flat Theme
A flat theme for Django admin interface. Modern, fresh, simple.
Stars: ✭ 415 (+802.17%)
Mutual labels:  django, django-admin
Django Advanced Filters
Add advanced filtering abilities to Django admin
Stars: ✭ 408 (+786.96%)
Mutual labels:  django, admin
Django Ordered Model
Get your Django models in order
Stars: ✭ 476 (+934.78%)
Mutual labels:  django, django-admin
Awesome Django
The Best Django Resource, Awesome Django for mature packages.
Stars: ✭ 591 (+1184.78%)
Mutual labels:  django, django-admin
Django Smuggler
Django Smuggler is a pluggable application for Django Web Framework that helps you to import/export fixtures via the automatically-generated administration interface.
Stars: ✭ 350 (+660.87%)
Mutual labels:  django, admin
Django Pagedown
A django app that allows the easy addition of Stack Overflow's "PageDown" markdown editor to a django form field, whether in a custom app or the Django Admin
Stars: ✭ 500 (+986.96%)
Mutual labels:  django, django-admin
Django Admin Interface
django's default admin interface made customizable. popup windows replaced by modals. :mage: ⚡️
Stars: ✭ 717 (+1458.7%)
Mutual labels:  django, admin
Django Object Actions
A Django app for easily adding object tools in the Django admin
Stars: ✭ 374 (+713.04%)
Mutual labels:  django, django-admin
Django Blogging System
This is blog system created using Django 1.11.4 and Python3
Stars: ✭ 11 (-76.09%)
Mutual labels:  django, django-admin
Django Nested Admin
Django admin classes that allow for nested inlines
Stars: ✭ 463 (+906.52%)
Mutual labels:  django, django-admin
Awesome Django Admin
Curated List of Awesome Django Admin Panel Articles, Libraries/Packages, Books, Themes, Videos, Resources.
Stars: ✭ 356 (+673.91%)
Mutual labels:  django, django-admin
Django Jazzmin
Jazzy theme for Django
Stars: ✭ 574 (+1147.83%)
Mutual labels:  django, admin
Django Phantom Theme
Phantom is theme for django admin with many widgets, based on Twitter bootstrap 3.x.
Stars: ✭ 18 (-60.87%)
Mutual labels:  django, django-admin
Django Oml
Object Moderation Layer
Stars: ✭ 12 (-73.91%)
Mutual labels:  django, django-admin
Djangocms Admin Style
django CMS Admin Style is a Django Theme tailored to the needs of django CMS.
Stars: ✭ 282 (+513.04%)
Mutual labels:  django, django-admin
Django Jet
Modern responsive template for the Django admin interface with improved functionality. We are proud to announce completely new Jet. Please check out Live Demo
Stars: ✭ 3,207 (+6871.74%)
Mutual labels:  django, admin

Screenshot

django-admin-numeric-filter

django-admin-numeric-filter provides you several filter classes for Django admin which you can use to filter results in change list. It works in list_filter when a field name is defined as list where the first value is field name and second one is custom filter class (you can find classes below).

Don't forget to inherit your model admin from admin_actions.admin.NumericFilterModelAdmin to load custom CSS styles and JavaScript files declared in inner Media class.

Getting started

  1. Installation
pip install django-admin-numeric-filter
  1. Add admin_numeric_filter into INSTALLED_APPS in your settings file before django.contrib.admin.

Sample admin configuration

from admin_numeric_filter.admin import NumericFilterModelAdmin, SingleNumericFilter, RangeNumericFilter, \
    SliderNumericFilter

from .models import YourModel


class CustomSliderNumericFilter(SliderNumericFilter):
    MAX_DECIMALS = 2
    STEP = 10


@admin.register(YourModel)
class YourModelAdmin(NumericFilterModelAdmin):
    list_filter = (
        ('field_A', SingleNumericFilter), # Single field search, __gte lookup
        ('field_B', RangeNumericFilter), # Range search, __gte and __lte lookup
        ('field_C', SliderNumericFilter), # Same as range above but with slider
        ('field_D', CustomSliderNumericFilter), # Filter with custom attributes
    )

Filter classes

Class name Description
admin_actions.admin.SingleNumericFilter Single field search, __gte lookup
admin_actions.admin.RangeNumericFilter Range search, __gte and __lte lookup
admin_actions.admin.SliderNumericFilter Same as range above but with slider

Slider default options for certain field types

Django model field Step Decimal places
django.db.models.fields.DecimalField() Based on decimal places max precision from DB
django.db.models.fields.FloatField() Based on decimal places field decimal_places attr
django.db.models.fields.IntegerField() 1 0
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].