1 January 2017
I love Django a lot; it still surprises me how productive I can be in it. And, especially in more recent versions, the error handling for weird configuration problems is much, much better than it used to be.
But sometimes, you get an error whose origin is slightly mysterious. Thus, it can be helpful to have a log of what Django says, and what it means.
Site matching query does not exist
This usually means one of two things:
- You forgot to create the record for the site in in your
django_sitetable. If so, create a data migration or fixture!
- You forgot the
SITE_IDsetting in your settings.py entirely. I did this while moving a project from an old version of Django.