djangodjango-rest-frameworkdjango-subdomains

The host 127.0.0.1:8000 does not belong to the domain example.com, unable to identify the subdomain for this request


I am new to Django. I was trying to launch "NewsBlur" (Django based) to my local PC , when everything is set. I ran "python3 manage.py runserver" . Whenever I tried to click btn or manually trigger http request I got error below on my server:

The host 127.0.0.1:8000 does not belong to the domain example.com, unable to identify the subdomain for this request

Anything I incorrectly configured in django ?

My [settings.py][2]


Solution

  • When using the django.contrib.sites framework, the first site is installed with domain name 'example.com', using:

    You can open the Django admin if it is made available and go to the "sites" app, then change the domain name of the site. Or you can connect to the PostgreSQL database and change the row, which will be in the django_site table.