【发布时间】:2013-02-10 11:23:59
【问题描述】:
我正在尝试在 NGINX 和 uWSGI 后面运行 Django 应用程序,但遇到datetime.today() 返回从今天开始安装 uWSGI 服务器时的日期时间的问题。
该应用的配置如下:
uWSGI 的设置是默认设置,没有任何变化。
我怎样才能让日期时间重新开始工作?
澄清: 在访问 url 时在此函数中进行调用
def create_file_header(name, ext):
return {'Content-Disposition': 'attachment; filename=%s-%s.%s' % (name, datetime.date.today(), ext) }
调用来自 urlpatten:
(r'^loading_details/basic2/$', ExpandedResource(ReadLoadingDetailHandler, authentication=authentication, headers=create_file_header('loading-details', 'csv')), FORMAT_CSV, "api_loading_details_basic_auth"),当使用 Apache WSGI 托管在同一台服务器上时它可以工作
【问题讨论】: