#34230: Django templates shouldn't use a .html extension
--------------------------------------------+-------------------------
               Reporter:  Amin Shah Gilani  |          Owner:  nobody
                   Type:  Uncategorized     |         Status:  new
              Component:  Uncategorized     |        Version:  4.1
               Severity:  Normal            |       Keywords:  django-
           Triage Stage:  Unreviewed        |      Has patch:  0
    Needs documentation:  0                 |    Needs tests:  0
Patch needs improvement:  0                 |  Easy pickings:  0
                  UI/UX:  0                 |
--------------------------------------------+-------------------------
 Hello,

 Only my second time filing a ticket so please go easy on me.

 Django's templates use a `.html` file extension. This is incorrect and
 causes issues:

 * The files aren't HTML, they're template files
 * Linters associated with `.html` extensions expect HTML and will attempt
 to format them
 * Tools that calculate metrics associated with HTML files won't recognize
 that the files aren't HTML

 Ruby/Rails gets around this issue by using the `.html.erb` (Embedded Ruby)
 extension, and there are comparable examples in other ecosystems like the
 `.html.ejs` (Embedded JavaScript) templating language.

 I believe Django can get around this with a similar terminating extension,
 e.g. `.html.dtl` (Django Templating), or `.html.django`, or even
 `.html.djgo`.

 Adopting an extension for the templating language will make things easier
 out of the box.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34230>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070185537e69a2-2e5123e8-dcc7-4ded-8510-6756c03147dd-000000%40eu-central-1.amazonses.com.

Reply via email to