Skip to main content

citry-django-djc

Let citry-django read Django's syntax the way django-components does.

pip install citry-django[django-components]
from citry import Citry
from citry_django import CitryDjangoExtension
from citry_django_djc import tokenize

app = Citry(extensions=[CitryDjangoExtension(tokenizer=tokenize)])

Django's own lexer ends a tag at the first %}, even one inside a quoted argument. django-components replaces the tokenizer so a tag can carry template source as data:

{% component "code_block" code="{% if user %}Hi{% endif %}" %}{% endcomponent %}

citry-django claims byte ranges with whichever tokenizer it was given. Hand it this one and the two agree; without it they disagree on where that tag ends, and you get an error.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

citry_django_djc-0.1.0.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

citry_django_djc-0.1.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file citry_django_djc-0.1.0.tar.gz.

File metadata

  • Download URL: citry_django_djc-0.1.0.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for citry_django_djc-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1a084d73edacba1c9b8cd9d35a69d4fc68037472ce255edbd631cd4930baddfb
MD5 c45d0b1ce9c9ccf95cd0e8b0ff0823aa
BLAKE2b-256 88752e0fdad627868a5ac9f3a9c89cf336a326b2bd7c0069f9c97e668eeb62d6

See more details on using hashes here.

Provenance

The following attestation bundles were made for citry_django_djc-0.1.0.tar.gz:

Publisher: publish.yml on joeyjurjens/citry-django

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file citry_django_djc-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for citry_django_djc-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 344592dcc0186aa0d87a05eff56b43bfd5ac5acb20009870e759d5cc02d57864
MD5 f29e458d69310954cdde8405b5928efd
BLAKE2b-256 1a18f5444acdec1902b7d3e4cca2fd6a559df6adfc51ca09c0496a196b37a9f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for citry_django_djc-0.1.0-py3-none-any.whl:

Publisher: publish.yml on joeyjurjens/citry-django

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page