[Answered ]-Django: django.contrib.sites, SITE_ID, breaks app

2👍

What kind of error do you get when you add SITE_ID in the settings file?

This problem usually occurs when there is a discrepancy with data in the table django_site. Check if your dev and prod database have the same values in that table. Some models may refer to some Django models that use the Site models itself, and unless they cannot find a valid django.contrib.sites.models.site instance in the database, they will raise an exception. This happens if using the FlatPage models for instance.

👤Tisho

Leave a comment