Forums

TemplateDoesNotExist Help me

edited by admin for formatting

myapp
                ├── db.sqlite3
                ├── index
                │   ├── __init__.py
                │   ├── __pycache__
                │   │   ├── __init__.cpython-37.pyc
                │   │   ├── admin.cpython-37.pyc
                │   │   ├── models.cpython-37.pyc
                │   │   ├── urls.cpython-37.pyc
                │   │   └── views.cpython-37.pyc
                │   ├── admin.py
                │   ├── apps.py
                │   ├── migrations
                │   │   └── __init__.py
                │   ├── models.py
                │   ├── tests.py
                │   ├── urls.py
                │   └── views.py
                ├── login
                │   ├── __init__.py
                │   ├── __pycache__
                │   │   ├── __init__.cpython-37.pyc
                │   │   ├── admin.cpython-37.pyc
                │   │   ├── models.cpython-37.pyc
                │   │   ├── urls.cpython-37.pyc
                │   │   └── views.cpython-37.pyc
                │   ├── admin.py
                │   ├── apps.py
                │   ├── migrations
                │   │   └── __init__.py
                │   ├── models.py
                │   ├── tests.py
                │   ├── urls.py
                │   └── views.py
                ├── manage.py
                ├── myapp
                │   ├── __init__.py
                │   ├── __pycache__
                │   │   ├── __init__.cpython-37.pyc
                │   │   ├── settings.cpython-37.pyc
                │   │   └── urls.cpython-37.pyc
                │   ├── settings.py
                │   ├── urls.py
                │   └── wsgi.py
                ├── redirect
                │   ├── __init__.py
                │   ├── __pycache__
                │   │   ├── __init__.cpython-37.pyc
                │   │   ├── admin.cpython-37.pyc
                │   │   ├── models.cpython-37.pyc
                │   │   ├── urls.cpython-37.pyc
                │   │   └── views.cpython-37.pyc
                │   ├── admin.py
                │   ├── apps.py
                │   ├── migrations
                │   │   └── __init__.py
                │   ├── models.py
                │   ├── tests.py
                │   ├── urls.py
                │   └── views.py
                ├── static
                │   └── css
                │       └── style.css
                └── templates
                    ├── index
                    │   └── index.html
                    ├── login
                    │   └── index.html
                    ├── redirect
                    │   └── index.html
                    └── test
                        └── index.html

and in my settings.py:

    TEMPLATES = [
        {
            'BACKEND': 'django.template.backends.django.DjangoTemplates',
            'DIRS': ['templates'],
            'APP_DIRS': True,
            'OPTIONS': {
                'context_processors': [
                    'django.template.context_processors.debug',
                    'django.template.context_processors.request',
                    'django.contrib.auth.context_processors.auth',
                    'django.contrib.messages.context_processors.messages',
                ],
            },
        },
    ]

What i do wrong? I dont understand whats a problem. On my local machine it's work fine

I suspect that the values in dirs need to be fully specified. See http://help.pythonanywhere.com/pages/NoSuchFileOrDirectory/ for details and how to fix it.

I'm having the same issue - same structure as @gusstav474, but I'm equally confused about how to work this out. I think PA just couldn't find the templates outside the folder that contains "settings.py". But in my local, it works perfectly fine. Anyone could help with it, please? Thank you!!

read glenn's post above