Opened 7 years ago

Closed 2 years 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

Description

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@…> 7 years ago.
ticket_7281.patch (5.3 KB) - added by d1ffuz0r 3 years ago.
Improvements. Tag moved to builtins, tests and documentation.

Download all attachments as: .zip

Change History (14)

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

comment:1 Changed 7 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: http://groups.google.com/group/django-developers/msg/00a5d83e8c80df6c

comment:2 Changed 7 years ago by ericholscher

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

comment:3 Changed 7 years ago by simon

More work on this: http://code.google.com/p/django-html/

See also http://groups.google.com/group/django-developers/browse_thread/thread/f04aed2bc60274f0

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 6 years ago by anonymous

  • milestone post-1.0 deleted

Milestone post-1.0 deleted

comment:5 Changed 4 years ago by gabrielhurley

  • Component changed from Contrib apps to contrib.webdesign

comment:6 Changed 4 years ago by lukeplant

  • Severity set to Normal
  • Type set to New feature

comment:7 Changed 4 years ago by julien

  • Easy pickings unset
  • Needs tests set

comment:8 Changed 3 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

Changed 3 years ago by d1ffuz0r

Improvements. Tag moved to builtins, tests and documentation.

comment:9 Changed 3 years ago by d1ffuz0r

  • Cc d1fffuz0r@… added

Improvements in attached file.

comment:10 Changed 3 years ago by d1ffuz0r

  • Needs tests unset

comment:11 Changed 2 years 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 2 years ago by aaugustin

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

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

Note: See TracTickets for help on using tickets.
Back to Top