我想要使用多個設置模塊,一個用於生產,一個基地和一個本地不會進入版本控制(git在我的情況下)。 Django提出了TemplateDoesExist,模板就在那裏。我所有的設置文件都在設置文件夾裏面。Django提高模板DoesNotExist當我使用多個設置模塊
這是base.py:http://pastebin.com/Ek4vzyCa
這是local.py:http://pastebin.com/S9AAVhH8
這是production.py:http://pastebin.com/Zw8bhBfk
而且manage.py:http://pastebin.com/i4AAP1Ce
Internal Server Error:/
Traceback (most recent call last):
File "/home/sebastian/Envs/Spartan/local/lib/python2.7/site-packages /django/core/handlers/base.py", line 149, in get_response
response = self.process_exception_by_middleware(e, request)
File "/home/sebastian/Envs/Spartan/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 147, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/sebastian/Documents/project-spartan/basicpages/views.py", line 24, in home
'categories': categories
File "/home/sebastian/Envs/Spartan/local/lib/python2.7/site-packages/django/shortcuts.py", line 67, in render
template_name, context, request=request, using=using)
File "/home/sebastian/Envs/Spartan/local/lib/python2.7/site-packages/django/template/loader.py", line 96, in render_to_string
template = get_template(template_name, using=using)
文件「/home/sebastian/Envs/Spartan/local/lib/python2.7/site-packages/django/template/loader.py」 43行,在get_template 加註TemplateDoesNotExist(TEMPLATE_NAME,鏈=鏈) TemplateDoesNotExist:basicpages/index.html中 [28 /月/ 2016 19點47分48秒] 「GET/HTTP/1.1」 500 86041
這將是一個非常非常長的問題。 –
請顯示回溯。你是否試圖在本地啓動它? – chem1st
也顯示您的項目結構。那麼你運行項目的方式如何?只有'python manage.py runserver'沒有任何參數? – chem1st