Saturday, April 23, 2016

Django | DoesNotExist at /admin/login/ Site matching query does not exist

When typed  http://127.0.0.1:8000/admin/ into browser's address bar, I've encountered the following error.


I found that this is due to incorrect configuration inside settings.py file.

You don't really need the sites framework if you only run one site from the project, so the easiest fix would be to remove the following item from your INSTALLED_APPS and the error should go away:

'django.contrib.sites' ( It is a good practice to comment it and not to delete it )





If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

No comments:
Write comments