Visual Studio 2017でPythonのポーリングDjango Webプロジェクトを作成しました。
ローカルでは実行できるのですが、Azure上では「NameError at / name 'home' is not defined」のエラーを吐いてしまいます。
原因がわからず、難儀している感じです。
どなたか、ご存知の方、ご教授お願い致します。
よろしくお願い致します。
■試みたこと
・Visual Studio 2017でPythonのポーリングDjango Webプロジェクトを作成しました。
・Python環境は、virtual envのPythn3.4(64-bit)です。
・ソースは、LANGUAGE_CODEを日本に、TIME_ZONEを東京に変更したのみです。
・ローカルでの実行はうまくいきました。
・発行先を既存のMicrosoft Azure App Serviceにして発行しました。
■エラー表示
・メッセージ
NameError at /
name 'home' is not defined
Request Method: GET
Request URL: http://xxxxxx.azurewebsites.net/
Django Version: 1.9.4
Exception Type: NameError
Exception Value:
name 'home' is not defined
Exception Location: .\DjangoApp\urls.py in <module>, line 21
Python Executable: D:\Python27\python.exe
Python Version: 2.7.8
Python Path:
[u'D:\home\site\wwwroot\env\Lib\site-packages',
'.',
'D:\Windows\SYSTEM32\python27.zip',
'D:\Python27\DLLs',
'D:\Python27\lib',
'D:\Python27\lib\plat-win',
'D:\Python27\lib\lib-tk',
'D:\Python27',
'D:\Python27\lib\site-packages',
'D:\home\site\wwwroot']
Server time: Sun, 3 Sep 2017 16:46:06 +0000
・トレース結果の表示
Traceback:
File "D:\home\site\wwwroot\env\Lib\site-packages\django\core\handlers\base.py" in get_response
134. resolver_match = resolver.resolve(request.path_info)
File "D:\home\site\wwwroot\env\Lib\site-packages\django\core\urlresolvers.py" in resolve
374. for pattern in self.url_patterns:
File "D:\home\site\wwwroot\env\Lib\site-packages\django\utils\functional.py" in get
33. res = instance.dict[self.name] = self.func(instance)
File "D:\home\site\wwwroot\env\Lib\site-packages\django\core\urlresolvers.py" in url_patterns
417. patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "D:\home\site\wwwroot\env\Lib\site-packages\django\utils\functional.py" in get
33. res = instance.dict[self.name] = self.func(instance)
File "D:\home\site\wwwroot\env\Lib\site-packages\django\core\urlresolvers.py" in urlconf_module
410. return import_module(self.urlconf_name)
File "D:\Python27\lib\importlib_init_.py" in import_module
37. import(name)
File ".\DjangoApp\urls.py" in <module>
21. url(r'^$', home, name='home'),
Exception Type: NameError at /
Exception Value: name 'home' is not defined
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。