Opened 6 years ago

Closed 16 months ago

#7281 closed New feature (wontfix)

Add doctype tag to webdesign template tags

Reported by: Rob Hudson <treborhudson@…> Owned by: nobody
Component: contrib.webdesign Version: master
Severity: Normal Keywords: webdesign
Cc: d1fffuz0r@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


This was very lightly discussed here in the context of creating tags for newforms. I extracted the idea of doctypes and included it in the contrib.webdesign template tag library.

Attachments (2)

webdesign.diff (2.5 KB) - added by Rob Hudson <treborhudson@…> 6 years ago.
ticket_7281.patch (5.3 KB) - added by d1ffuz0r 19 months ago.
Improvements. Tag moved to builtins, tests and documentation.

Download all attachments as: .zip

Change History (14)

Changed 6 years ago by Rob Hudson <treborhudson@…>

comment:1 Changed 6 years ago by Rob Hudson <treborhudson@…>

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Forgot the link to the Django-devs list post by Simon Willison:

comment:2 Changed 6 years ago by ericholscher

  • milestone set to post-1.0
  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 6 years ago by simon

More work on this:

See also

I think these should be in the defaulttags rather than sitting in contrib, as the ability to write tags that are doctype aware feels like it should be a core promise of Django's API.

comment:4 Changed 5 years ago by anonymous

  • milestone post-1.0 deleted

Milestone post-1.0 deleted

comment:5 Changed 3 years ago by gabrielhurley

  • Component changed from Contrib apps to contrib.webdesign

comment:6 Changed 3 years ago by lukeplant

  • Severity set to Normal
  • Type set to New feature

comment:7 Changed 3 years ago by julien

  • Easy pickings unset
  • Needs tests set

comment:8 Changed 2 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

Changed 19 months ago by d1ffuz0r

Improvements. Tag moved to builtins, tests and documentation.

comment:9 Changed 19 months ago by d1ffuz0r

  • Cc d1fffuz0r@… added

Improvements in attached file.

comment:10 Changed 18 months ago by d1ffuz0r

  • Needs tests unset

comment:11 Changed 16 months ago by aaugustin

This ticket was opened 5 years ago. Since then HTML5 has won the HTML/XHTML race and it solves the doctype problem by simplifying it drastically: <!DOCTYPE HTML>.

In my opinion the {% doctype %} tag would add very little value nowadays:

  • existing projects already have doctypes hardcoded in their templates and don't need it;
  • new projects should use HTML5 in general — it's an established best practice since 2010 (roughly).

I'm leaning towards "wontfix". I'm sorry, because you've obviously put some effort into the patch (it looks good). When you're working on such an old ticket, it's often a good idea to make sure the decision still stands, especially if it depends on the current state of the ecosystem — that states changes over the course of years.

comment:12 Changed 16 months ago by aaugustin

  • Resolution set to wontfix
  • Status changed from new to closed

I got a second vote for "wontfix" on IRC.

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.