[Fixed]-Can't access Django admin site while import django.contrib.sites

1👍

It is recognizing the URL but it’s trying to do a query for a site object somewhere and not finding it.

This can be caused by a variety of things such as when you have another package that is dependent upon having a site. For me, django-allauth is usually the culprit, but you don’t have that information so I can’t be sure.

In your settings, try putting SITE = 1 in your settings file and see if that gets rid of your error.

Leave a comment