소스 검색

获取域名

peng 2 년 전
부모
커밋
a9f1274a56
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      controller/beian.py

+ 3 - 1
controller/beian.py

@@ -2,9 +2,11 @@
 # @File      : beian.py
 # @Time      : 2023/3/30 19:10
 from django.http import HttpResponse
+import logging
 
-
+logger = logging.getLogger('django')
 def beianPath(request, **kwargs):
+    logger.info('域名:{}'.format(request.get_host()))
     html = """
     <!DOCTYPE html>
 <html lang="en">