Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Bryan BRANCOTTE
django-basetheme-bootstrap
Commits
b1837f8c
Commit
b1837f8c
authored
Mar 25, 2020
by
Bryan BRANCOTTE
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use preferences_groups order when available
parent
1dcc2d01
Pipeline
#26547
passed with stage
in 38 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
basetheme_bootstrap/user_preferences.py
basetheme_bootstrap/user_preferences.py
+7
-1
setup.py
setup.py
+1
-1
No files found.
basetheme_bootstrap/user_preferences.py
View file @
b1837f8c
...
...
@@ -99,13 +99,19 @@ class UserPreferencesAbstractModel(models.Model):
@
classmethod
def
get_allowed_fields
(
cls
):
if
cls
.
preferences_groups
is
not
None
:
for
group
,
fields
in
cls
.
preferences_groups
.
items
():
for
f
in
fields
:
yield
f
return
for
field_name
in
[
f
.
name
for
f
in
cls
.
_meta
.
get_fields
()]:
if
field_name
==
"id"
or
field_name
==
"pk"
or
field_name
==
"user"
:
continue
yield
field_name
@
classmethod
@
property
def
preferences_groups
(
self
):
def
preferences_groups
(
cls
):
return
None
@
property
...
...
setup.py
View file @
b1837f8c
...
...
@@ -7,7 +7,7 @@ readme = open('README.rst').read()
setup
(
name
=
'django-basetheme-bootstrap'
,
version
=
'0.2.2
8
'
,
version
=
'0.2.2
9
'
,
description
=
'Django Basetheme Bootstrap'
,
long_description
=
readme
,
author
=
'Bryan Brancotte'
,
...
...
Write
Preview
Markdown
is supported
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