8π
It seems the SITE_ID setting in your settings file is pointing to an ID that doesnβt exist in your database.
You either need to create a new site in the sites model (via admin) and change the ID in the settings file to match that one, or re-insert the item via SQL and give it the same ID as your settings file.
0π
This problem will always seem to occur continually, so if you donβt want to serve your model with multiple sites, then I suggest you remove the SITE_ID from the setting file. Note this worked for me!
- [Django]-Querying for timestamp field in django
- [Django]-How to use filter_horizontal on a ForeignKey between two apps using ContentTypes in Django admin?
- [Django]-Get local system time in Django
-1π
I just had to remove the 'django.contrib.sessions'
from INSTALLED_APPS
in settings.py
as it was causing problems and I was using this project only for one site.
However, if you are using your project for multiple different sites and need the Django sites framework, please check SITE_ID
in your database and if it matches the one defined in the settings.
- [Django]-Django preview, TypeError: 'str' object is not callable
- [Django]-SMTPAuthenticationError at /password-reset/
- [Django]-Django post_save and south migrations
- [Django]-Django β Model class interfaces?
- [Django]-AWS copilot with Django never finishes deploying