Commit e794d03c authored by Bryan  BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

filter_horizontal for M2M in admin

parent f489c76a
Pipeline #61371 passed with stage
in 50 seconds
......@@ -55,6 +55,7 @@ class UserPreferencesAdmin(admin.ModelAdmin):
"user",
]
]
filter_horizontal = [field.name for field in get_user_preference_class()._meta.get_fields() if field.many_to_many]
def username(self, obj):
return mark_safe("<i>default preferences</i>") if obj.user is None else obj.user
......
......@@ -7,7 +7,7 @@ readme = open('README.rst').read()
setup(
name='django-basetheme-bootstrap',
version='0.2.62',
version='0.2.63',
description='Django Basetheme Bootstrap',
long_description=readme,
author='Bryan Brancotte',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment