Code

Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#13620 closed (invalid)

django template revision

Reported by: elkan Owned by: nobody
Component: Template system Version: master
Severity: Keywords: template tags
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Hi, kinda new here. I've been studying the way we do template tags, and had a suggestion for how to revise them to make them a bit easier. I was thinking that out of the tags, I like the variable syntax the best -- {{ variable.attribute }}. I realize that if we were to use the double curly brackets on all of the tags, they might conflict with the namespace, but it seems like having "block", "if", "elsif", "else", "for", and "extends" and their respective 'end'ings as keywords would not be burdensome. It's really unpleasant typing {%%} and left arrow twice, space, the item name, and space for every tag and for its closing tag.

An alternative that wouldn't affect the namespace but would still be more convenient for both plain typing and possibly for code completion (I don't know why eclipse pydev doesn't close these tags) would be triple brackets -- block head .

-Dan

Attachments (0)

Change History (2)

comment:1 Changed 4 years ago by adamnelson

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

I think it's a reasonable request but this would require a rigorous discussion on django developers newsgroup before even having a ticket and would be more like a 1.4 thing:

http://groups.google.com/group/django-developers

You may want to try TextMate Django bundles to make this easier on a Mac - I don't have any other suggestions though.

Cheers.

comment:2 Changed 3 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

Add Comment

Modify Ticket

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


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

 
Note: See TracTickets for help on using tickets.