I am using allauth with wagtail. I have name my site 'mysite' in the wagtail admin, but when sign up emails refer to 'example.com'
My settings.py has apps in the following order
[ ...
'django.contrib.auth',
'django.contrib.sites',
"allauth",
"allauth.account",
"allauth.socialaccount",
"allauth.account",
"allauth.socialaccount",
'wagtail.contrib.forms',
'wagtail.contrib.redirects',
'wagtail.embeds',
'wagtail.sites',
'wagtail.users',
'wagtail.snippets',
'wagtail.documents',
'wagtail.images',
'wagtail.search',
'wagtail.admin',
'wagtail.core',
]
It sounds as though this might be related to the conflict between django and wagtail described here https://github.com/wagtail/wagtail/issues/2840. However it looks as though that issue has been closed and I am using recent version (Django==3.2.11, django-allauth==0.47.0, wagtail==2.15.1)
CodePudding user response:
This is the expected behaviour - django-allauth is a Django package, not a Wagtail-specific one, and always uses Django's site model even when Wagtail is active. To update the site name, log in to the Django admin backend (as distinct from the Wagtail one - this can be found at http://localhost:8000/django-admin/
if you set up your project with the wagtail start
command) and go to the Sites item.
The issue being fixed in https://github.com/wagtail/wagtail/issues/2840 was that Wagtail and django-allauth could not coexist at all, due to both of them trying to set a conflicting request.site
variable.