app settings: rename the get user queryset func setting name.

master
Tom Hacohen 5 years ago
parent 46b4f08afa
commit e41f8455f2

@ -48,8 +48,8 @@ class AppSettings:
return ret
@cached_property
def GET_USER_QUERYSET(self): # pylint: disable=invalid-name
get_user_queryset = self._setting("GET_USER_QUERYSET", None)
def GET_USER_QUERYSET_FUNC(self): # pylint: disable=invalid-name
get_user_queryset = self._setting("GET_USER_QUERYSET_FUNC", None)
if get_user_queryset is not None:
return self.import_from_str(get_user_queryset)
return None

@ -6,7 +6,7 @@ User = get_user_model()
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:
return custom_func(queryset, view)
return queryset

Loading…
Cancel
Save