Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#17618 closed Cleanup/optimization (fixed)

Variables names in template must not start with an underscore.

Reported by: cguillemette@… Owned by: krzysiumed
Component: Documentation Version: master
Severity: Normal Keywords:
Cc: krzysiumed@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

The doc (https://docs.djangoproject.com/en/dev/ref/templates/api/) says "Variable names must consist of any letter (A-Z), any digit (0-9), an underscore or a dot.".

It can be misleading, because in fact, variable names can consist of underscores but can't start with one.

Attachments (1)

ticket17618.diff (529 bytes) - added by krzysiumed 3 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 3 years ago by claudep

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted
  • Type changed from Uncategorized to Cleanup/optimization
  • Version changed from 1.3 to SVN

Changed 3 years ago by krzysiumed

comment:2 Changed 3 years ago by krzysiumed

  • Cc krzysiumed@… added
  • Easy pickings set
  • Has patch set
  • Owner changed from nobody to krzysiumed
  • Status changed from new to assigned

I've written a patch.

comment:3 Changed 3 years ago by charettes

  • Triage Stage changed from Accepted to Ready for checkin

Looks good to me.

comment:4 Changed 3 years ago by timo

  • Resolution set to fixed
  • Status changed from assigned to closed

In [17504]:

Fixed #17618 - Documented that variable names in template must not start with an underscore; thanks guillemette and krzysiumed.

comment:5 Changed 3 years ago by timo

In [17505]:

[1.3.X] Fixed #17618 - Documented that variable names in template must not start with an underscore; thanks guillemette and krzysiumed.

Backport of r17504 from trunk.

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