I installed pypugjs
, added it to settings.py
, it works fine, but when I'm trying to pass object to Pug mixin - I got a TemplateSyntaxError
-
Could not parse the remainder: '{age:20' from '{age:20'
mixin card(data)
div #{data}
+card({age:20, name:'Alex'})
How to pass more than one named filed to Pug mixin in Django?
you would do it like this:
or alternatively (i simplified to test my answer :)