Friday, March 5, 2021
A very easy problem that I couldn't figure it out! PLEASE HELP^^
Environment:
Request Method: GET
Request URL: http://127.0.0.1:8000/
Django Version: 3.1.7
Python Version: 3.9.1
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'pages.apps.PagesConfig']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']
Template loader postmortem
Django tried loading these templates, in this order:
Using engine django:
* django.template.loaders.filesystem.Loader: C:\Users\napil\Desktop\dev\btre_project\templates\pages\index.html (Source does not exist)
* django.template.loaders.app_directories.Loader: C:\Users\napil\Desktop\dev\btre_project\venv\lib\site-packages\django\contrib\admin\templates\pages\index.html (Source does not exist)
* django.template.loaders.app_directories.Loader: C:\Users\napil\Desktop\dev\btre_project\venv\lib\site-packages\django\contrib\auth\templates\pages\index.html (Source does not exist)
Traceback (most recent call last):
File "C:\Users\napil\Desktop\dev\btre_project\venv\lib\site-packages\django\core\handlers\exception.py", line 47, in inner
response = get_response(request)
File "C:\Users\napil\Desktop\dev\btre_project\venv\lib\site-packages\django\core\handlers\base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "C:\Users\napil\Desktop\dev\btre_project\pages\views.py", line 6, in index
return render(request, 'pages/index.html')
File "C:\Users\napil\Desktop\dev\btre_project\venv\lib\site-packages\django\shortcuts.py", line 19, in render
content = loader.render_to_string(template_name, context, request, using=using)
File "C:\Users\napil\Desktop\dev\btre_project\venv\lib\site-packages\django\template\loader.py", line 61, in render_to_string
template = get_template(template_name, using=using)
File "C:\Users\napil\Desktop\dev\btre_project\venv\lib\site-packages\django\template\loader.py", line 19, in get_template
raise TemplateDoesNotExist(template_name, chain=chain)
Exception Type: TemplateDoesNotExist at /
Exception Value: pages/index.html
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/9f6202d4-5ab8-4c58-a7c6-1d55a9d2fb7an%40googlegroups.com.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment