How to use Django to get the name for the host server?
I need the name of the hosting server instead of the client name?
I generally put something like this in settings.py:
settings.py
import socket try: HOSTNAME = socket.gethostname() except: HOSTNAME = 'localhost'
1.4m articles
1.4m replys
5 comments
57.0k users