app settings: rename the get user queryset func setting name.
This commit is contained in:
parent
46b4f08afa
commit
e41f8455f2
@ -48,8 +48,8 @@ class AppSettings:
|
|||||||
return ret
|
return ret
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
def GET_USER_QUERYSET(self): # pylint: disable=invalid-name
|
def GET_USER_QUERYSET_FUNC(self): # pylint: disable=invalid-name
|
||||||
get_user_queryset = self._setting("GET_USER_QUERYSET", None)
|
get_user_queryset = self._setting("GET_USER_QUERYSET_FUNC", None)
|
||||||
if get_user_queryset is not None:
|
if get_user_queryset is not None:
|
||||||
return self.import_from_str(get_user_queryset)
|
return self.import_from_str(get_user_queryset)
|
||||||
return None
|
return None
|
||||||
|
@ -6,7 +6,7 @@ User = get_user_model()
|
|||||||
|
|
||||||
|
|
||||||
def get_user_queryset(queryset, view):
|
def get_user_queryset(queryset, view):
|
||||||
custom_func = app_settings.GET_USER_QUERYSET
|
custom_func = app_settings.GET_USER_QUERYSET_FUNC
|
||||||
if custom_func is not None:
|
if custom_func is not None:
|
||||||
return custom_func(queryset, view)
|
return custom_func(queryset, view)
|
||||||
return queryset
|
return queryset
|
||||||
|
Loading…
Reference in New Issue
Block a user