Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to resolve UserWarnings for deprecated USERNAME_REQUIRED and EMAIL_REQUIRED fields in Django Allauth 65.5.0

In a fresh Django project using a fresh venv, I have installed the following dependencies:

dj-rest-auth==7.0.1
Django==5.1.7
django-allauth==65.5.0
djangorestframework==3.15.2
djangorestframework_simplejwt==5.5.0
social-auth-app-django==5.4.3

and I have added the following settings:

ACCOUNT_SIGNUP_FIELDS = ["email*", "password1*", "password2*"]
ACCOUNT_LOGIN_METHODS = {"email"}
ACCOUNT_EMAIL_VERIFICATION = "mandatory"

I can confirm I have added no extra allauth settings.

Migrations have run successfully, but when I run my server I get:

.venv/lib/python3.10/site-packages/allauth/account/app_settings.py:540: UserWarning: app_settings.USERNAME_REQUIRED is deprecated, use: app_settings.SIGNUP_FIELDS['username']['required']
  return getattr(_app_settings, name)
.venv/lib/python3.10/site-packages/allauth/account/app_settings.py:540: UserWarning: app_settings.EMAIL_REQUIRED is deprecated, use: app_settings.SIGNUP_FIELDS['email']['required']
  return getattr(_app_settings, name)
System check identified no issues (0 silenced).
like image 319
Faith Baghan Avatar asked Oct 16 '25 13:10

Faith Baghan


1 Answers

It seems to have been fixed in latest release (65.6.0).

like image 96
fidelleon Avatar answered Oct 19 '25 05:10

fidelleon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!