---
canonical: "https://www.jsolly.com/blog/Prettier-code-formatter-breaks-Django-templates/"
title: "Why You Shouldn't Use Prettier on Django Template Files"
description: "Don't use Prettier on Django Templates: My Experience and Why it's Not Compatible with the Template Language's Syntax"
author: "John Solly"
published: "2022-08-03T19:39:58.281Z"
updated: "2022-08-03T19:39:58.281Z"
---

<a id="why-you-shouldnt-use-prettier-on-django-template-files"></a>

# Why You Shouldn't Use Prettier on Django Template Files

![Prettier Logo with a red x over it](https://d1d7p8ufhgz4ld.cloudfront.net/media/post_metaimgs/prettierLogo.webp)

https://raw.githubusercontent.com/prettier/prettier-logo/master/images/prettier-banner-dark.png

I recently tried prettier out on HTML files in my project. Unfortunately, it tends to break Django template code and [Prettier doesn't intend to fix it](https://github.com/prettier/prettier/issues/5581). Makes sense as it's tricky that Python is whitespace sensitive and Prettier's userbase is mainly JS devs.

Django devs beware! Don't use prettier if you use Django's templating engine!!!!

August 3, 2022 in [Dev Tools](https://www.jsolly.com/blog/category/dev-tools/)

Updated August 3, 2022
