---
slug: "django test NameError: name 'module1' is not defined"
title: "Django で ./manage.py test 時に NameError: name 'module1' is not defined が出る"
description: "Apache + ELB 配下の Django で、`request.build_absolute_uri()` が HTTP を返してしまうのを HTTPS にする `USE_X_FORWARDED_HOST` / `SECURE_PROXY_SSL_HEADER` 設定。"
url: "https://www.ytyng.com/blog/django test NameError: name 'module1' is not defined"
publish_date: "2018-03-29T06:37:49Z"
created: "2018-03-29T06:37:49Z"
updated: "2026-05-11T13:21:44.983Z"
categories: ["Django"]
keywords: ""
featured_image_url: "https://media.ytyng.com/resize/20230812/158cdfa6b62e4102b18127753cff3d95.png.webp?width=768"
has_video: false
has_music: false
video_urls: []
music_urls: []
lang: "ja"
---

# Django で ./manage.py test 時に NameError: name 'module1' is not defined が出る

<p>Django で、</p>
<pre>./manage.py test</pre>
<p>した時に</p>
<pre>NameError: name 'module1' is not defined</pre>
<p>エラーになる場合。</p>
<p>Python3.4 を使ってるなら、Python3.6とかにアップデートするのが手っ取り早い</p>
<p></p>
