-1

I have a problem that is recovering the domain of the site that is currently active, I need to recover it in settings to pass a configuration of a project that I am doing and since I can not use

from django.contrib.sites.models import get_current_site

or something like settings, is there any way to get the domain here?

mascDriver
  • 35
  • 9

1 Answers1

0

Maybe this will help: https://docs.djangoproject.com/en/dev/ref/contrib/sites/#enabling-the-sites-framework

In order to serve different sites in production, you’d create a separate settings >file with each SITE_ID (perhaps importing from a common settings file to avoid >duplicating shared settings) and then specify the appropriate >DJANGO_SETTINGS_MODULE for each site.