Questions tagged [django-sekizai]

Sekizai is a plugin for Django which provides support for dynamic adding of content into the template block tags.

django-sekizai is a pluggable django app that provides support for dynamic adding of content into the template block tags.

Sekizai means “blocks” in Japanese, and that’s what this application provides.

A fresh look at blocks.

With django-sekizai, you can define placeholders where your blocks get rendered and at different places in your templates append to those blocks. This is especially useful for CSS and JavaScript code. Your subtemplates can now define CSS and JavaScript files to be included, and the CSS will be nicely put at the top and the JavaScript code to the bottom, just like you should. Also, sekizai will ignore any duplicate content in a single block.

21 questions
15
votes
2 answers

django sekizai {% addtoblock %} tag is not working properly

I'm trying to implement django sekizai app. It is duplicating the js files that i'm adding. base template: {% load sekizai_tags %} ... {% render_block "my_js" %} template that is using this base: {% load sekizai_tags %}
{%…
Vikas Gulati
  • 968
  • 2
  • 10
  • 24
8
votes
1 answer

Correct way to use Sekizai addtoblock in a DjangoCMS plugin

I am working on a DjangoCMS plugin, which includes a javascript file for itself. The plugin's Javascript relies on the same libraries that the rest of the site does. So, here's the conceptual part of what I have right now: Basetemplate.html {%…
Zak Patterson
  • 389
  • 5
  • 11
4
votes
0 answers

Optional django-sekizai for an API

I'm writing a basic API, where it extends a DetailView to display the latest object for a given model. As part of the site, django-sekizai is used for django-cms and as a result all used templates need to have the sekizai tags, however these aren't…
Peter Brooks
  • 1,170
  • 9
  • 23
3
votes
1 answer

JavaScript syntax highlighting in PyCharm Professional

I'm using sekizai in the Professional version of PyCharm to control where my JavaScript code is rendered to in the page. In my django template code, this means that my JavaScript is not enclosed in the usual