How to use Django to get the name for the host server?

后端 未结 7 2025
天命终不由人
天命终不由人 2020-12-13 17:18

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?

7条回答
  •  北荒
    北荒 (楼主)
    2020-12-13 17:28

    Basically, You can take with request.get_host() in your view/viewset. It returns

提交回复
热议问题