User configuration
List of settings
These settings can be used to configure how the user model
(specified by settings.AUTH_USER_MODEL
) should be used.
You should add them as keys (with values)
to your settings.REST_REGISTRATION
dict.
The USER_*
fields can be set directly in the user class (specified
by settings.AUTH_USER_MODEL
) without using the USER_
prefix
(EMAIL_FIELD
, etc.). These settings will override these provided in
settings.REST_REGISTRATION
.
‘USER_LOGIN_FIELDS’
Type:
typing.Optional[typing.List[str]]
Default:
None
Setting that defines the list of fields which can be treated as
“login” fields. An example of such fields would be username
, email
.
If not set / set to None
, it will fall back to one-element list
containing user_class.USERNAME_FIELD
,
This setting is used by default ‘LOGIN_AUTHENTICATOR’ implementation and default ‘SEND_RESET_PASSWORD_LINK_USER_FINDER’ implementation.
To ensure integrity, Django-REST-Registration will check if each of the listed fields is unique. If you want to disable that check, please refer to ‘USER_LOGIN_FIELDS_UNIQUE_CHECK_ENABLED’.
‘USER_LOGIN_FIELDS_UNIQUE_CHECK_ENABLED’
Type:
bool
Default:
True
If enabled, each of the fields listed in ‘USER_LOGIN_FIELDS’ will be checked if it is unique.
Disable this setting only when you know what you’re doing!
‘USER_PUBLIC_FIELDS’
Default:
None
No description available, please add it here!
‘USER_EDITABLE_FIELDS’
Default:
None
No description available, please add it here!
‘USER_EMAIL_FIELD’
Default:
'email'
No description available, please add it here!
‘USER_VERIFICATION_ID_FIELD’
Default:
'pk'
Field used in verification, as part of signed data.
The given field should uniquely identify the user. This means that
using any user field which could change over time
(email
, username
) is NOT recommended.
‘USER_VERIFICATION_FLAG_FIELD’
Default:
'is_active'
No description available, please add it here!