Can Not Find Django Tutorial Django-polls Templates Error

Table of Contents

1. Question.

According to the official document tutorial of Django project, i meet below problems in the chapter “Advanced tutorial: How to write reusable apps”.

  1. Install django-polls to MySite as directed.
    pip --user install /Users/john/django-polls/dist/django-polls-0.1.tar.gz
  2. Run Django server after install successfully.
    python runserver
  3. Browse url in a web browser and returns an error.

    Below is mysite’s file TEMPLATES section.

            'BACKEND': 'django.template.backends.django.DjangoTemplates',
            'DIRS': [os.path.join(BASE_DIR, 'templates')],
            'APP_DIRS': True,
            'OPTIONS': {
                'context_processors': [

2. Answer.

  1. The reason for this error maybe wrong directory or directory does not have the corresponding template file, you can create the template file to fix it.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.