Skip to content

Conversation

PhuyalGaurav
Copy link

Fix deprecated allauth settings usage

Description

This PR fixes deprecation warnings by updating the serializers to use the new
allauth settings structure. Specifically, it updates from deprecated settings like
USERNAME_REQUIRED and EMAIL_REQUIRED to the new SIGNUP_FIELDS dictionary structure.

Changes

  • Updated RegisterSerializer to use SIGNUP_FIELDS dictionary for username and email required fields
  • Updated ResendEmailVerificationSerializer to use SIGNUP_FIELDS dictionary for email required field
  • Added fallbacks to maintain backward compatibility

Related Issues

Fixes deprecation warnings:

  • app_settings.USERNAME_REQUIRED is deprecated, use: app_settings.SIGNUP_FIELDS['username']['required']
  • app_settings.EMAIL_REQUIRED is deprecated, use: app_settings.SIGNUP_FIELDS['email']['required']

Testing

All tests pass successfully with the updated settings usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant