Add support for a custom user creation function.

This commit is contained in:
Tom Hacohen
2020-07-13 16:20:46 +03:00
parent e41f8455f2
commit c9463cadba
3 changed files with 20 additions and 2 deletions

View File

@@ -54,6 +54,13 @@ class AppSettings:
return self.import_from_str(get_user_queryset)
return None
@cached_property
def CREATE_USER_FUNC(self): # pylint: disable=invalid-name
func = self._setting("CREATE_USER_FUNC", None)
if func is not None:
return self.import_from_str(func)
return None
@cached_property
def CHALLENGE_VALID_SECONDS(self): # pylint: disable=invalid-name
return self._setting("CHALLENGE_VALID_SECONDS", 60)