Skip to content

Commit

Permalink
requirements: update django-allauth to 65.x
Browse files Browse the repository at this point in the history
  • Loading branch information
goapunk authored and m4ra committed Dec 3, 2024
1 parent ca29ca6 commit 4cd24c1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions changelog/8450.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### Changed

- update django-allauth to 65.x
- rename and adapt `get_email_confirmation_redirect_url` to `get_email_verification_redirect_url`
- update django-allauth settings to the new style
10 changes: 5 additions & 5 deletions meinberlin/apps/users/adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ def send_mail(self, template_prefix, email, context):
context.update({"email": email})
return UserAccountEmail.send(email, template_name=template_prefix, **context)

def get_email_confirmation_redirect_url(self, request):
if "next" in request.GET and url_has_allowed_host_and_scheme(
request.GET["next"], allowed_hosts=None
def get_email_verification_redirect_url(self, email_address):
if "next" in self.request.GET and url_has_allowed_host_and_scheme(
self.request.GET["next"], allowed_hosts=None
):
return request.GET["next"]
return self.request.GET["next"]
else:
return super().get_email_confirmation_redirect_url(request)
return super().get_email_verification_redirect_url(email_address)

def clean_username(self, username):
username = super().clean_username(username)
Expand Down
2 changes: 1 addition & 1 deletion meinberlin/config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@
ACCOUNT_LOGIN_ON_EMAIL_CONFIRMATION = True
ACCOUNT_LOGIN_ON_PASSWORD_RESET = True
ACCOUNT_USERNAME_REQUIRED = True
ACCOUNT_PREVENT_ENUMERATION = True
ACCOUNT_PREVENT_ENUMERATION = "strict"
SOCIALACCOUNT_AUTO_SIGNUP = False
SOCIALACCOUNT_EMAIL_VERIFICATION = "none"
SOCIALACCOUNT_FORMS = {"signup": "meinberlin.apps.users.forms.SocialTermsSignupForm"}
Expand Down
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ zeep==4.2.1

# Inherited a4-core requirements
celery==5.4.0
django-allauth==0.61.1
django-allauth==65.3.0
django-autoslug==1.9.9
django-ckeditor==6.7.1
https://github.com/liqd/django-ckeditor-5/releases/download/v0.2.13-liqd/django_ckeditor_5-0.2.13-py3-none-any.whl
Expand Down

0 comments on commit 4cd24c1

Please sign in to comment.