TemplateDoesNotExist at /myapp/hello/
templets.html
Request Method:GET
Request URL:http://127.0.0.1:8000/myapp/hello/
Django Version:4.2.5
Exception Type:TemplateDoesNotExist
Exception Value:
templets.html
Exception Location:C:\Users\kqusa\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\template\loader.py, line 19, in get_template
Raised during:myapp.views.hello_world
Python Executable:C:\Users\kqusa\AppData\Local\Programs\Python\Python311\python.exe
Python Version:3.11.5
Python Path:
['C:\\Users\\kqusa\\Downloads\\django\\django-basics', 'C:\\Users\\kqusa\\AppData\\Local\\Programs\\Python\\Python311\\python311.zip', 'C:\\Users\\kqusa\\AppData\\Local\\Programs\\Python\\Python311\\DLLs', 'C:\\Users\\kqusa\\AppData\\Local\\Programs\\Python\\Python311\\Lib', 'C:\\Users\\kqusa\\AppData\\Local\\Programs\\Python\\Python311', 'C:\\Users\\kqusa\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages']
Server time:Sun, 24 Sep 2023 17:15:17 +0000
Template-loader postmortem
Django tried loading these templates, in this order:
Using engine django:
django.template.loaders.app_directories.Loader: C:\Users\kqusa\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\contrib\admin\templates\templets.html (Source does not exist)
django.template.loaders.app_directories.Loader: C:\Users\kqusa\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\contrib\auth\templates\templets.html (Source does not exist)
Traceback Switch to copy-and-paste view
C:\Users\kqusa\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\core\handlers\exception.py, line 55, in inner
response = get_response(request) ^^^^^^^^^^^^^^^^^^^^^
…
Local vars
C:\Users\kqusa\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\core\handlers\base.py, line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
…
Local vars
C:\Users\kqusa\Downloads\django\django-basics\myapp\views.py, line 7, in hello_world
return render(request, 'templets.html') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
…
السؤال
Ahmed Mohammed Qusailah
رسالة الخطأ:
توضيح السؤال
2 أجوبة على هذا السؤال
Recommended Posts
انضم إلى النقاش
يمكنك أن تنشر الآن وتسجل لاحقًا. إذا كان لديك حساب، فسجل الدخول الآن لتنشر باسم حسابك.