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

This version

0.2.1

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.1.tar.gz (554.4 kB view hashes)

Uploaded Source

Built Distribution

djlint-0.2.1-py3-none-any.whl (26.6 kB view hashes)

Uploaded Python 3

Supported by

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