Django-allauth: Site Matching Query Does Not Exist

Updated

Have you tried installing django-allauth and encountered this particular error?

Allauth Error Page

I did, too, recently, and I've been successfully using django-allauth for years, so you're in good company! The issue is that the quickstart guide leaves out a critical piece of configuration: setting a SITE_ID in the settings.py file.

# settings.py
SITE_ID = 1  # new

If this configuration isn't present, the sites framework, which is closely linked to django-allauth, won't work. You'll receive this somewhat cryptic error message: "Site matching query does not exist."

If you want a complete guide to configuring Django and django-allauth, check out the complete tutorial available here.