You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DjangoBlog/djangoblog/wsgi.py

21 lines
746 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

"""
WSGI config for djangoblog project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/
"""
import os
# 导入Django的WSGI应用获取函数
from django.core.wsgi import get_wsgi_application
#姜雨菲: 设置Django默认的配置模块环境变量
#姜雨菲: 告诉Django使用哪个settings.py文件这里指定为项目的djangoblog.settings
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "djangoblog.settings")
#姜雨菲: 创建WSGI应用实例
#姜雨菲: 这个application变量会被WSGI服务器如Gunicorn、uWSGI调用处理HTTP请求
application = get_wsgi_application()