django-smartbase-admin 1.0.16__py3-none-any.whl → 1.0.17__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- django_smartbase_admin/admin/admin_base.py +2 -0
- django_smartbase_admin/engine/configuration.py +4 -0
- django_smartbase_admin/services/configuration.py +4 -1
- django_smartbase_admin/static/sb_admin/dist/main.js +1 -1
- django_smartbase_admin/static/sb_admin/dist/table.js +1 -1
- django_smartbase_admin/static/sb_admin/src/js/datepicker_plugins.js +1 -1
- django_smartbase_admin/templates/sb_admin/inlines/stacked_inline.html +7 -2
- {django_smartbase_admin-1.0.16.dist-info → django_smartbase_admin-1.0.17.dist-info}/METADATA +1 -1
- {django_smartbase_admin-1.0.16.dist-info → django_smartbase_admin-1.0.17.dist-info}/RECORD +11 -11
- {django_smartbase_admin-1.0.16.dist-info → django_smartbase_admin-1.0.17.dist-info}/LICENSE.md +0 -0
- {django_smartbase_admin-1.0.16.dist-info → django_smartbase_admin-1.0.17.dist-info}/WHEEL +0 -0
|
@@ -1150,11 +1150,13 @@ class SBAdminGenericTableInlinePaginated(SBAdminGenericTableInline):
|
|
|
1150
1150
|
class SBAdminStackedInline(SBAdminInline, NestedStackedInline):
|
|
1151
1151
|
template = "sb_admin/inlines/stacked_inline.html"
|
|
1152
1152
|
fieldset_template = "sb_admin/includes/inline_fieldset.html"
|
|
1153
|
+
formset = SBAdminNestedInlineFormSet
|
|
1153
1154
|
|
|
1154
1155
|
|
|
1155
1156
|
class SBAdminGenericStackedInline(SBAdminInline, NestedGenericStackedInline):
|
|
1156
1157
|
template = "sb_admin/inlines/stacked_inline.html"
|
|
1157
1158
|
fieldset_template = "sb_admin/includes/inline_fieldset.html"
|
|
1159
|
+
formset = SBAdminGenericInlineFormSet
|
|
1158
1160
|
|
|
1159
1161
|
|
|
1160
1162
|
if parler_enabled:
|
|
@@ -8,6 +8,7 @@ from django_smartbase_admin.engine.const import (
|
|
|
8
8
|
FilterVersions,
|
|
9
9
|
Action,
|
|
10
10
|
)
|
|
11
|
+
from django_smartbase_admin.models import ColorScheme
|
|
11
12
|
from django_smartbase_admin.utils import to_list, is_modal
|
|
12
13
|
|
|
13
14
|
|
|
@@ -39,6 +40,7 @@ class SBAdminRoleConfiguration(metaclass=Singleton):
|
|
|
39
40
|
menu_items = None
|
|
40
41
|
global_filter_form = None
|
|
41
42
|
filters_version = FilterVersions.FILTERS_VERSION_1
|
|
43
|
+
default_color_scheme = ColorScheme.AUTO
|
|
42
44
|
|
|
43
45
|
def __init__(
|
|
44
46
|
self,
|
|
@@ -47,6 +49,7 @@ class SBAdminRoleConfiguration(metaclass=Singleton):
|
|
|
47
49
|
menu_items=None,
|
|
48
50
|
global_filter_form=None,
|
|
49
51
|
filters_version=None,
|
|
52
|
+
default_color_scheme=None,
|
|
50
53
|
) -> None:
|
|
51
54
|
super().__init__()
|
|
52
55
|
self.default_view = default_view or self.default_view or []
|
|
@@ -56,6 +59,7 @@ class SBAdminRoleConfiguration(metaclass=Singleton):
|
|
|
56
59
|
self.init_configuration_static()
|
|
57
60
|
self.autocomplete_map = {}
|
|
58
61
|
self.filters_version = filters_version or self.filters_version
|
|
62
|
+
self.default_color_scheme = default_color_scheme or self.default_color_scheme
|
|
59
63
|
|
|
60
64
|
def init_registered_views(self):
|
|
61
65
|
registered_views = []
|
|
@@ -30,6 +30,9 @@ class SBAdminUserConfigurationService(object):
|
|
|
30
30
|
from django_smartbase_admin.models import SBAdminUserConfiguration
|
|
31
31
|
|
|
32
32
|
user_config, created = SBAdminUserConfiguration.objects.get_or_create(
|
|
33
|
-
|
|
33
|
+
defaults={
|
|
34
|
+
"color_scheme": request.request_data.configuration.default_color_scheme
|
|
35
|
+
},
|
|
36
|
+
user_id=request.user.id,
|
|
34
37
|
)
|
|
35
38
|
return user_config
|