You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Django本地与生产环境(Nginx+Gunicorn)波兰语日期翻译差异排查

Django本地与生产环境(Nginx+Gunicorn)波兰语日期翻译不一致问题
  • 本地环境与生产环境(Nginx+Gunicorn)的日期翻译存在差异,仅波兰语出现该问题,德语、日语、英语、西班牙语在生产环境下均正常显示。
  • 本地环境日期显示:
    localhost
  • 生产环境(Nginx+Gunicorn)日期显示:
    production server nginx gunicorn
  • 已尝试的排查操作:手动清理Nginx缓存、重启/重载服务器、重启Gunicorn及Gunicorn.socket,问题未解决。

Settings.py配置代码

LANGUAGE_CODE = "en-us"

LANGUAGES = [
    ("pl", "Polski"),
    ("en", "English"),
    ("es", "Español"),
    ("de", "Deutsch"),
    ("ja", "Japanese"),
]

LOCALE_PATHS = (
    os.path.join(BASE_DIR, "locale"),
)


TIME_ZONE = "Europe/Warsaw"

USE_I18N = True

USE_L10N = True

USE_TZ = True

HTML模板代码

{% for concert in concerts %}
    <div class="detailed-page-text calendar">
        <p class="concert-title">{{ concert.title }}</p>
        <p class="concert-date">{{ concert.date }}</p>
        <p class="concert-time"><bold>{{ concert.time }}</bold></p>
        <p class="concert-location">{{ concert.location_main_name }}</p>
        <p class="concert-address">{{ concert.location_address }}, {{ concert.city }}</p>
        {% if concert.link_to_details %}
            <a class="more" href="{{ concert.link_to_details }}"> {% trans "More" %}</a>
        {% endif %}
        <br>
    </div>
{% endfor %}

内容的提问来源于stack exchange,提问作者doss manoss

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.20 08:48:18