[Answer]-Django: get current domain name in setting.py

1👍

You can use the package django-hosts to do this for you. It changes the url conf based on the domain name. It does this in the middleware layer.

It’s very easy to set up.

Leave a comment