Skip to main content

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.

Requirements

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

Installation

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 settings.py. It also requires the BASE_DIR setting to exist in your settings.py, which should be present if you used the Django startproject template.

Usage

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

python manage.py 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.

License

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.

Metadata

Release files for django-template-check 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-template-check 0.4.0
File Size Uploaded
django-template-check-0.4.0.tar.gz 5.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-template-check 0.4.0
File Interpreter ABI Platform
django_template_check-0.4.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 12.6 kB

Release files / django-template-check-0.4.0.tar.gz

Download URL django-template-check-0.4.0.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
43f85b3e9624a39117a6e003bcf0a46f1769f239129830ec9608c86f7ad33447
BLAKE2b-256 checksum
How to use checksums
74a481fc9dc93a48e81e5e69c106156b8142f865c11d612420bbde392842c85b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.7

Release files / django_template_check-0.4.0-py2.py3-none-any.whl

Download URL django_template_check-0.4.0-py2.py3-none-any.whl
Size 6.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
fb4600b9fcec545513ae5b3afdb428a3d74d4ae65b578b4b33a7dbd5b33c0d27
BLAKE2b-256 checksum
How to use checksums
2543b71b658239add1a35620719bc8929e887af860f9f432150bc1b68e53a883
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.7

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release 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