
Product
Introducing Repository Access Permissions and Custom Roles
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.
@rhinostone/swig-django
Advanced tools
Django-syntax frontend for the @rhinostone/swig-core template engine. Part of the @rhinostone/swig multi-flavor family.
Django Template Language frontend for the @rhinostone/swig-core template engine. Part of the multi-flavor architecture introduced in 2.0.0 — see ROADMAP.md for the release narrative.
npm install @rhinostone/swig-django
This pulls in @rhinostone/swig-core as a peer dependency, pinned to the matching version. Frontends and the core release in lockstep — do not mix versions.
var swig = require('@rhinostone/swig-django');
var out = swig.render('Hello, {{ name|upper }}!', {
locals: { name: 'world' }
});
// => Hello, WORLD!
Renders real Django templates — everything below was cross-checked against Django 5.2.
if / elif / else, for / empty (with forloop), block, extends, include, with, autoescape, spaceless, comment, verbatim, cycle, firstof.alters_data / do_not_call_in_templates), numeric indexing works ({{ list.0 }}), and dicts iterate via .keys / .values / .items.{{ value|date:"Y-m-d" }}).add, addslashes, capfirst, center, cut, date, default, default_if_none, divisibleby, escape / e, escapejs, filesizeformat, first, floatformat, force_escape, get_digit, iriencode, join, last, length, linebreaks, linebreaksbr, linenumbers, ljust, lower, make_list, phone2numeric, pluralize, rjust, safe, slice, slugify, striptags, time, title, truncatechars, truncatewords, upper, urlencode, wordcount, wordwrap, yesno). See lib/filters.js for the full list.renderFileAsync / compileFileAsync for async loaders, plus renderFile(path, locals, cb) against a loader with async === true.{% load %} and custom tag libraries — no code-loading.{% url %}, {% static %}, {% csrf_token %}, {% trans %}, {% blocktrans %} — framework infrastructure, out of scope.{%- … -%}) — not part of the Django Template Language.is tests — Django's is is identity comparison, not Jinja2-style tests.{{ block.super }}, {% for … reversed %}, and one-variable {% for x in dict.items %} are deferred (clear parse-time errors).dictsort / dictsortreversed, stringformat, random, urlize / urlizetrunc, timesince / timeuntil, unordered_list, json_script, truncatechars_html / truncatewords_html, safeseq, pprint.Source: gina-io/swig/packages/swig-django. File issues and PRs at gina-io/swig.
MIT. See LICENSE in the monorepo root.
FAQs
Django-syntax frontend for the @rhinostone/swig-core template engine. Part of the @rhinostone/swig multi-flavor family.
We found that @rhinostone/swig-django demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.