TemplateNotFound in Django project using pyjade?

544 views Asked by At

I have a layout.jade file that contains just a basic skeleton:

html
head
body
    header
    block content

    footer

In the same directory, I also have a mypage.jade file that contains

extends layout
block content
    p Hello World

Rendering layout.jade as a response does just fine. However, when I try and render mypage.jade it doesn't go through, and I get a TemplateDoesNotExist error. What gives?

1

There are 1 answers

0
neptune On BEST ANSWER

Turns out you have to add the explicit directory to TEMPLATE_DIRS in the Django settings.py, and everything works