Skip to main content

Perform (minimal) syntax checks for Django templates.

Project description

django-template-check travis

This package makes it possible to easily check for basic syntax errors in all loaded Django templates. This can be useful as part of a continuous integration step in a build process, so as not to discover these problems at runtime.

Currently, checking is very minimal, simply relying on the exceptions raised by Django’s compile and render template pipeline. Furthermore, only the default Django template backend is tested and supported.


This package requires Django version 1.8 or greater, and has been tested with 2.2 and 3.0


Simply get the package from pip:

pip install django-template-check

Then make sure to add django_template_check to your INSTALLED_APPS in your It also requires the BASE_DIR setting to exist in your, which should be present if you used the Django startproject template.


After installing this package, simply use it by calling the management command:

python templatecheck

Optionally, only check templates that live inside the project directory by specifying the --project-only flag. This can be useful to ignore errors in 3rd party dependencies.


All included code is available under the CC0 1.0 Universal Public Domain Dedication.

django-template-check Changelog

0.3.1 (2018-01-08)

  • Fix Django 2.0 support (thanks to Thom Wiggers).

0.3.0 (2016-08-25)

  • Add –project-only option to ignore 3rd party code.

0.2.1 (2016-08-11)

  • Fix a typo in the install instructions.

0.2.0 (2016-08-11)

  • Return 1 when there are errors.

0.1.1 (2016-08-11)

  • Fix packaging to actually include code.

0.1.0 (2016-08-11)

  • Initial working prototype.

Project details

Download files

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

Source Distribution

django-template-check-0.4.0.tar.gz (5.9 kB view hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page