Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
django-basetheme-bootstrap
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bryan BRANCOTTE
django-basetheme-bootstrap
Commits
371ecff9
Commit
371ecff9
authored
7 months ago
by
Bryan BRANCOTTE
Browse files
Options
Downloads
Patches
Plain Diff
bugfix when not user preference class is defined
parent
b47e60e4
No related branches found
No related tags found
No related merge requests found
Pipeline
#146257
passed
7 months ago
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
basetheme_bootstrap/admin.py
+5
-1
5 additions, 1 deletion
basetheme_bootstrap/admin.py
setup.cfg
+1
-1
1 addition, 1 deletion
setup.cfg
with
6 additions
and
2 deletions
basetheme_bootstrap/admin.py
+
5
−
1
View file @
371ecff9
...
@@ -55,7 +55,11 @@ class UserPreferencesAdmin(admin.ModelAdmin):
...
@@ -55,7 +55,11 @@ class UserPreferencesAdmin(admin.ModelAdmin):
"
user
"
,
"
user
"
,
]
]
]
]
filter_horizontal
=
[
field
.
name
for
field
in
get_user_preference_class
().
_meta
.
get_fields
()
if
field
.
many_to_many
]
filter_horizontal
=
[
field
.
name
for
field
in
(
[]
if
get_user_preference_class
()
is
None
else
get_user_preference_class
().
_meta
.
get_fields
()
)
if
field
.
many_to_many
]
def
username
(
self
,
obj
):
def
username
(
self
,
obj
):
return
mark_safe
(
"
<i>default preferences</i>
"
)
if
obj
.
user
is
None
else
obj
.
user
return
mark_safe
(
"
<i>default preferences</i>
"
)
if
obj
.
user
is
None
else
obj
.
user
...
...
This diff is collapsed.
Click to expand it.
setup.cfg
+
1
−
1
View file @
371ecff9
[metadata]
[metadata]
name
=
django-basetheme-bootstrap
name
=
django-basetheme-bootstrap
version
=
1.8.
5
version
=
1.8.
6
description
=
Django Basetheme Bootstrap
description
=
Django Basetheme Bootstrap
long_description
=
file: README.rst
long_description
=
file: README.rst
url
=
https://gitlab.pasteur.fr/bbrancot/django-basetheme-bootstrap
url
=
https://gitlab.pasteur.fr/bbrancot/django-basetheme-bootstrap
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment