Where is no way to find host name in settings module. To solve the
problem you can split your settings.py file into host-specified-
settings.py and settings.py
Into settings.py:
from host-specified-settings import *
So you can have one settings.py but many host-specified files at
different server
hello,
in a view it's easy to find out under wich host the django-project ist
running:
{{{
def view(request):
from django import http
hostname = http.get_host(request)
}}}
hostname ist set to localhost:8000 running the django-app with ./
manage.py runserver
but how do i access the full host-
2 matches
Mail list logo