You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
doctype html
head
block title
block externalLinks
html
body
h1 test
index.pug:
extends layout
include ./external/a.pug
include ./external/b.pug
block title
meta(charset='UTF-8')
title Django test website
block externalLinks
+a()
+b()
The issue i am facing is that i cannot include more than one pug file. Without including b.pug everything works fine. However once b.pug is included I get a TemplateSyntactError
What I Did
Request Method: | GET
-- | --
http://127.0.0.1:8000/
3.0.4
TemplateSyntaxError
Macro 'b' is not defined
/home/bd/anaconda2/lib/python3.6/site-packages/pypugjs/ext/django/templatetags.py in do_usemacro, line 198
/home/bd/anaconda2/bin/python
3.6.0
['/home/bd/Documents/test/mydjango', '/home/bd/anaconda2/lib/python36.zip', '/home/bd/anaconda2/lib/python3.6', '/home/bd/anaconda2/lib/python3.6/lib-dynload', '/home/bd/.local/lib/python3.6/site-packages', '/home/bd/anaconda2/lib/python3.6/site-packages']
Sun, 29 Mar 2020 02:37:41 +0000
Error during template rendering
In template /home/bd/Documents/test/mydjango/templates/index.pug, error at line 15
The text was updated successfully, but these errors were encountered:
I just ran into the issue that the extends keyword isn't supported. Without seeing what's referred to by "Error during template rendering", one can't be entirely sure, but I'd guess you're running into the same problem I did. If you want to double-check, you can "flatten" out your index.pug to move the layout inline, and try again.
Description
Hey everyone,
I have this following setup:
-- templates
--external
--a.pug
--b.pug
index.pug
layout.pug
layout.pug:
index.pug:
a.pug:
b.pug:
The issue i am facing is that i cannot include more than one pug file. Without including b.pug everything works fine. However once b.pug is included I get a TemplateSyntactError
What I Did
The text was updated successfully, but these errors were encountered: