Pyjade's implementation of include doesn't support mixins, but "extends" does, although you have to use a "block". So what you could do if you just need to import one file: extends mixins.jade block layout +link("example", "http://example.com/") mixins.jade: mixin link(text, url) a(href=url)= text block layout (Answering my own question, because I...
Solved it going a different direction. I created a context_processor at the top of my views.py file and that made it available to my template as a function. views.py @app.context_processor def utility_processor(): def subdivide_list(list_to_group, group_size): return [list_to_group[i:i+group_size] for i in range(0, len(list_to_group), group_size)] return dict(subdivide_list=subdivide_list) gallery.jade div.col-md-9 for product_row in...
I don't use jade or pyjade much, but I have used jinja2 with python 3.x. Based on the jade and pyjade docs, what you have is not valid jade syntax: Jinja's with statement is not supported in jade nor does pyjade support embedding python code in your jade template (see...