Skip to main content

Django Template Linter

Project description

djLint Logo

Simple html template linter and reformatter to find common formatting issues. djLint is intended as a django template linter and django template formatter.

Ps, --check it out on Jinja and Handlebar templates as well!

codecov test Codacy Badge Maintainability Downloads

Documentation

Read the documentation

Installation and Usage

djLint can be installed with pip install djlint, and is easy to run:

# to lint a directory
djlint /path

# to lint a directory with custom extension
djlint /path -e html.dj

# to check formatting on a file
djlint /path/file.html.j2 --check

# to reformt a directory without printing the file diff
djlint /path --reformat --quiet

Show your format

Add a badge to your projects readme.md:

[![Code style: black](https://img.shields.io/badge/html%20style-djlint-blue.svg)](https://github.com/Riverside-Healthcare/djlint)

Add a badge to your readme.rst:

.. image:: https://img.shields.io/badge/html%20style-djlint-blue.svg
   :target: https://github.com/Riverside-Healthcare/djlint

Looks like this:

djlint

Contributing - Please Help!

Checkout the issue list and help where you can!

Changelog

0.0.8

Added rules.

0.0.1

Initial release.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

djlint-0.2.8.tar.gz (554.7 kB view details)

Uploaded Source

Built Distribution

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

djlint-0.2.8-py3-none-any.whl (26.7 kB view details)

Uploaded Python 3

File details

Details for the file djlint-0.2.8.tar.gz.

File metadata

  • Download URL: djlint-0.2.8.tar.gz
  • Upload date:
  • Size: 554.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6

File hashes

Hashes for djlint-0.2.8.tar.gz
Algorithm Hash digest
SHA256 dfec329e5411ca8fea5e896598dfbba0db66ea5ed43f85c5fbcf93f937b329f9
MD5 683a2ff76a4294d38dd0478f592e3d3f
BLAKE2b-256 a2185171bf76f17985d773e39c74e1619aac1ab9a092e2d5cf533b3f495a9605

See more details on using hashes here.

File details

Details for the file djlint-0.2.8-py3-none-any.whl.

File metadata

  • Download URL: djlint-0.2.8-py3-none-any.whl
  • Upload date:
  • Size: 26.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6

File hashes

Hashes for djlint-0.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 f0416b39c85a10770f2d684666396739637c08b19eca3a22f9b19bae60b55389
MD5 54cf212e8bfb8b82256b38c49beea4ec
BLAKE2b-256 b6d74a092fb3330a43ee34fa74eea5ddd91298a45de70c4a8b147dc33c1695df

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page