Description
Similar as #679 django-allauth refactored the settings to control which fields are required. Extract from the release notes:
Simplified signup form configuration. The following settings all controlled signup form:
ACCOUNT_EMAIL_REQUIRED
,ACCOUNT_USERNAME_REQUIRED
,ACCOUNT_SIGNUP_EMAIL_ENTER_TWICE
,ACCOUNT_SIGNUP_PASSWORD_ENTER_TWICE
. This setup had its issues. For example, when email was not required it was still available as an optional field, whereas the username field disappeared when not required. Also, for phone/SMS support, additional settings would have been required. The settings are now all deprecated, and replaced by one new setting:ACCOUNT_SIGNUP_FIELDS
, which can be configured to e.g.['username*', 'email', 'password1*', 'password2*']
to indicate which fields are present and required ('*'
). This change is performed in a backwards compatible manner.
Here are the warnings I caught as emitted from dj-rest-auth:
/opt/.venv/lib/python3.12/site-packages/dj_rest_auth/registration/serializers.py:228: UserWarning: app_settings.USERNAME_REQUIRED is deprecated, use: app_settings.SIGNUP_FIELDS['username']['required']
required=allauth_account_settings.USERNAME_REQUIRED,
/opt/.venv/lib/python3.12/site-packages/dj_rest_auth/registration/serializers.py:230: UserWarning: app_settings.EMAIL_REQUIRED is deprecated, use: app_settings.SIGNUP_FIELDS['email']['required']
email = serializers.EmailField(required=allauth_account_settings.EMAIL_REQUIRED)