Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Bryan BRANCOTTE
django-basetheme-bootstrap
Commits
e794d03c
Commit
e794d03c
authored
Jul 16, 2021
by
Bryan BRANCOTTE
Browse files
filter_horizontal for M2M in admin
parent
f489c76a
Pipeline
#61371
passed with stage
in 50 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
basetheme_bootstrap/admin.py
View file @
e794d03c
...
...
@@ -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
...
...
setup.py
View file @
e794d03c
...
...
@@ -7,7 +7,7 @@ readme = open('README.rst').read()
setup
(
name
=
'django-basetheme-bootstrap'
,
version
=
'0.2.6
2
'
,
version
=
'0.2.6
3
'
,
description
=
'Django Basetheme Bootstrap'
,
long_description
=
readme
,
author
=
'Bryan Brancotte'
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment